QuestionQ43

VerifiedProductionizing Data Pipelines

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:

Question Image

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?

Explanation

The processingTime trigger executes micro-batches at specified intervals. trigger(processingTime="5 seconds") configures the streaming query to wake up and process pending data every 5 seconds. This is the standard Spark Structured Streaming syntax for time-based micro-batch triggers.

Community Discussion

No comments yet. Be the first to start the discussion!