QuestionQ145

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 code block used by the data engineer is below:

Question Image

Which line 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?

Explanation

The processingTime parameter specifies how often to trigger a micro-batch in Structured Streaming. trigger(processingTime="5 seconds") executes a micro-batch every 5 seconds, processing new data that has arrived since the last trigger. Other options like "once" or "continuous" serve different execution patterns.

Community Discussion

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