Courseiva
Structured Streaming →hardMultiple Choice

Databricks-Spark-Assoc Structured Streaming Practice Question

A streaming query reads from a rate source and writes to a Delta table using `outputMode("append")`. The developer observes that the query processes data continuously but the Delta table remains empty. Which condition explains why no rows are written?

⚠ Common exam trap

The trap here is assuming append mode always writes rows immediately, when for windowed aggregations it delays emission until the watermark finalizes each window.

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

✓

The query includes a windowed aggregation with a watermark, and in append mode results are emitted only after the watermark passes the window end, so no rows are emitted until then.

With append output mode and a windowed aggregation, Structured Streaming waits until the watermark passes the end of a window before emitting that window's results. If the watermark has not advanced sufficiently, no rows are emitted, so the target Delta table stays empty even though the query is running and processing data. This is expected behavior, not a failure.

Answer analysis

Option-by-option breakdown

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

  • ✗

    The rate source does not support `outputMode("append")` and therefore emits no rows.

    Why it's wrong here

    The rate source is a testing source that generates rows with a timestamp and value, and it supports append mode. It continuously produces data, so append mode should emit rows. The issue is not with the rate source's compatibility with append mode, but with how the query's logic interacts with append mode and watermarks.

  • ✗

    The Delta sink requires `checkpointLocation` to be set, and without it the query silently discards all output.

    Why it's wrong here

    A checkpoint location is required for fault tolerance and is mandatory for most streaming sinks, but if it is missing, the query fails to start with an error rather than silently discarding output. The described symptom is that the query runs and processes data, so the checkpoint is likely configured. The empty table must be due to a different reason.

  • ✗

    The Delta table was created without specifying a schema, causing all writes to be rejected.

    Why it's wrong here

    Writing to a Delta table without a predefined schema is supported; Delta infers the schema from the DataFrame. A missing schema would not cause silent rejection of all writes. The query would either create the table with the inferred schema or fail with a clear error. The empty table is not due to schema absence.

  • ✓

    The query includes a windowed aggregation with a watermark, and in append mode results are emitted only after the watermark passes the window end, so no rows are emitted until then.

    Why this is correct

    In append mode, windowed aggregations emit a window's result only once the watermark has advanced past the window's end time, guaranteeing no further updates. If the watermark is large or the data stream is short, the watermark may not have passed any window end yet, so no rows are written. This explains why the query processes data but the Delta table remains empty.

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.