Q: 2
A data engineer has configured a Structured Streaming job to read from a table, manipulate the data,
and then perform a streaming write into a new table.
The cade block used by the data engineer is below:
If the data engineer only wants the query to execute a micro-batch to process data every 5 seconds,
which of the following lines of code should the data engineer use to fill in the blank?
If the data engineer only wants the query to execute a micro-batch to process data every 5 seconds,
which of the following lines of code should the data engineer use to fill in the blank?Options
Discussion
D. Some folks might get tricked by E but that's for continuous, not actual micro-batching. Only D uses processingTime and matches Databricks docs. If anyone thinks otherwise, open to hearing it.
D
Its E
D imo
Nah, not E. D is the one for micro-batch, pretty sure that's the main Databricks syntax trap here since continuous mode (E) isn't what the question describes.
Maybe E. From what I remember, continuous mode can also process at regular intervals if you specify time, so E should do the trick. I think official practice questions point to E for streaming jobs too, but let me know if I'm missing anything.
C/D? E feels like a trap since continuous isn't micro-batch, but not 100% sure.
So for micro-batch processing specifically, only D actually sets up a 5-second micro-batch interval. The other options don't use the right trigger syntax or use continuous mode instead. Pretty sure about this since it's straight from Databricks doc.
Why do they always sneak in weird syntax options? D is the right one here, since processingTime="5 seconds" sets the micro-batch trigger just like in the docs. A little torn when I first saw E but that's just for continuous, not micro-batch.
C vs D? Both have time specs but I think only D (
processingTime="5 seconds") directly controls micro-batch intervals in Structured Streaming. C looks like invalid syntax, and E is for continuous mode, not micro-batching. Not 100% sure though, anyone disagree?Be respectful. No spam.