Courseiva
Structured Streaming →easyMultiple Choice

Databricks-Spark-Assoc Structured Streaming Practice Question

A data engineer wants to run a Structured Streaming query that reads from a Kafka topic and writes aggregated counts to a console sink for debugging. The query uses a grouping aggregation on a tumbling event-time window. Which output mode must be used so that only rows that changed since the last trigger are emitted?

⚠ Common exam trap

The trap here is conflating update mode with complete mode: complete mode also shows changes, but it re-emits every row each trigger rather than only the rows that changed.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

update

Update mode is designed to emit only rows whose aggregate values changed since the last trigger. This matches the debugging need to see evolving window counts without reprinting the full result each time. Append withholds results until windows finalize, complete reprints everything, and snapshot is not a supported mode, so update is the correct choice.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    complete

    Why it's wrong here

    Complete mode re-emits the entire result table after every trigger, including all windows and their current counts. While it does reflect changes, it does not limit output to changed rows; the volume grows with the number of distinct windows. For a debugging console sink this produces excessive output and obscures which rows actually changed, so it does not meet the stated requirement of emitting only changed rows.

  • ✗

    snapshot

    Why it's wrong here

    Snapshot is not a valid output mode in Structured Streaming. The supported modes are append, update, and complete. Choosing this would cause an analysis error when the query is defined, since the engine does not recognize it. It may sound plausible because snapshot concepts exist in other systems, but it has no meaning here and cannot satisfy the requirement.

  • ✗

    append

    Why it's wrong here

    Append mode emits only new rows that were finalized since the last trigger. For an aggregation with a watermark, a window's result is emitted only when the watermark passes the end of the window, so output is delayed until the engine is confident no more late data will affect that window. While it can be used with aggregations, it does not emit updated rows for windows that are still open, which conflicts with the goal of seeing changed results each trigger.

  • ✓

    update

    Why this is correct

    Update mode emits only the rows that were updated since the previous trigger, which is exactly the requirement. For windowed aggregations, as new events arrive and counts change, the affected window rows are re-emitted each trigger with their updated values. This provides near-real-time visibility into evolving aggregates without reprinting the entire result set, making it suitable for a debugging console sink where you want to observe changes.

About these practice questions

This Databricks-Spark-Assoc question is part of Courseiva's 295-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Databricks exam blueprint

This Databricks-Spark-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-Spark-Assoc exam.