A scenario for a data engineer · Mid level and up
A stream that waits all day for one delivery
Penny · Finance
Friday, 09:20
Files land in cloud storage once a night. The Auto Loader stream that loads them into Databricks runs around the clock, on a cluster that is idle for twenty three hours a day.
What do you do?
Tap the one you would do. The answer opens below.
Show the best callThe best call
Keep the stream code, and run it as a scheduled job with the available now trigger.
Each night the job loads the new files and stops, and the compute stops with it.
Why
A stream does not have to run all the time. With the available now trigger it processes everything that is new and then stops, so a schedule can run it like a batch job while the checkpoint remembers what was already loaded.
Read it in the Databricks docs (opens in a new tab)The other two
- Works, at a price. Keep it running and lengthen the trigger interval to one hour.
- Fewer empty checks against storage. The cluster still runs all day.
- A poor call. Replace it with a nightly batch job that reads the whole folder.
- Every night it reads every file ever delivered, takes a little longer each night, and loads the old ones again.
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
- Structured Streaming: what changed recentlyNews, releases, videos and questions on it, gathered daily.
More scenarios
- The stream gets slower every week · data engineer
- Where should the new pipeline read from? · data engineer
- The hourly totals come up short · data engineer
- All 47 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.