Streaming and real-time data · Lesson 3 of 3
Streaming output modes and sinks
Choose how streaming results are written and exposed to consumers.
Lesson
Output mode controls which rows a streaming query sends to its sink: append emits newly added rows, update emits changed result rows where supported, and complete emits the full result table for each trigger. The valid modes depend on the query's operations and sink. Select based on what the consumer needs and the size or semantics of the result.
For stateful aggregations, verify whether a row can change after its first appearance and whether the sink supports updates. Checkpointing and sink idempotency also matter for retries. Test a restart and a late-arriving event to see whether output is duplicated or corrected as expected. Practice task: select a mode for a stateless filtered event stream and for a running aggregate.
Applying the pattern: Determine whether results are append-only or revisable, choose a compatible output mode and sink, and test restart and correction behavior.
Checks and failure modes: Selecting append for results that can later change may leave downstream consumers with stale aggregates.
Before production, test both a representative input and a boundary case. Confirm the expected row grain, permissions, recovery behavior, and observable output for the task. Record the configuration needed to reproduce the run and compare its result with the agreed data contract.
Practice task: Which output mode is conceptually intended to emit the full result table each trigger?
Visual guide
Choose streaming output semantics
-
Step 01
Inspect query
Determine whether rows can change.
-
Step 02
Choose mode
Append, update, or complete.
-
Step 03
Select sink
Confirm the sink supports that mode.
-
Step 04
Test recovery
Verify retries and late updates.
Key points
- Determine whether results are append-only or revisable, choose a compatible output mode and sink, and test restart and correction behavior.
- Selecting append for results that can later change may leave downstream consumers with stale aggregates.
- Re-run the included practice scenario after changing source data or transformation logic.
Check your understanding
Practice
Your learning progress