Skip to content

A scenario for a data engineer · Junior and up

The stream stopped on a new column

Parcel · A vendor
Wednesday, 14:20

A vendor added a column to their files. The Auto Loader stream on Databricks that loads them failed with an unknown field error, and the on-call channel is asking what broke.

What do you do?

Tap the one you would do. The answer opens below.

Show the best call

Nothing broke. Restart the stream, and set the job to restart by itself next time.

The stream picks up, and with schema merging on for the write, the new column is in the table. Next time it restarts with nobody awake.

Why

When Auto Loader infers the schema, its default is to add a new column to the schema it tracks, stop, and carry on after a restart. The stop is by design, so the stream belongs in a job that restarts it.

Read it in the Databricks docs (opens in a new tab)

The other two

Works, at a price. Switch to rescue mode, so new columns go into the rescued data column and the stream never stops.
The stream never stops again. The new column can only be reached by digging through the rescued data.
A poor call. Pin the old schema and ignore columns you do not know.
The stream runs. The new column is thrown away without a word, and nobody finds out until it is needed.

The words in this scenario

Auto Loader.
A way to load files from cloud storage as they arrive. It keeps track of which files it has already loaded. In the docs (opens in a new tab)

Go deeper on brickster.ai

More scenarios

Had one like this at work? Send it to us: the best tickets come from real incidents.

Checked against the Databricks documentation on . brickster.ai is independent and is not affiliated with Databricks.