Courseiva
Structured Streaming →hardMultiple Choice

Databricks-Spark-Assoc Structured Streaming Practice Question

A streaming DataFrame `df` has a watermark defined on `eventTime` with a delay of 5 minutes. The query uses `withWatermark("eventTime", "5 minutes")` and writes to a Delta table in `append` output mode. A record with event time 10:00 arrives when the watermark is at 10:10. What happens to this record?

⚠ Common exam trap

The trap here is assuming that late data is buffered or triggers an error, rather than being silently dropped in append mode once the watermark has passed.

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 record is dropped because its event time is older than the watermark.

With a 5-minute watermark, any record whose event time is more than 5 minutes behind the current watermark is considered late. In append mode, such records are dropped because the system assumes all data for that time has already been emitted. The record at 10:00 arrives when the watermark is 10:10, so it is 10 minutes late and is discarded. This matches the expected watermark behavior.

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 record is held in state until the next watermark update and then emitted.

    Why it's wrong here

    Holding late records in state is not how watermarking works. Once the watermark exceeds an event time by the delay, the record is considered too late and is dropped in append mode. State is used for aggregations and deduplication, but it does not resurrect records that are already past the watermark threshold. This option misrepresents the state management behavior.

  • ✗

    The record causes the query to fail with a watermark violation error.

    Why it's wrong here

    Late data does not cause query failure. Structured Streaming handles late records gracefully by dropping them when they fall outside the watermark in append mode. There is no watermark violation error that terminates the query. This option incorrectly suggests a fatal error, which is not part of the watermark design in Structured Streaming.

  • ✓

    The record is dropped because its event time is older than the watermark.

    Why this is correct

    In append mode, records with event times older than the current watermark are considered too late and are dropped. The watermark is at 10:10, and the record's event time is 10:00, which is 10 minutes behind, exceeding the 5-minute delay. Therefore the record is discarded and will not appear in the output. This is the correct behavior for this scenario.

  • ✗

    The record is processed and appended to the Delta table immediately.

    Why it's wrong here

    Append mode only emits rows once they are final, meaning after the watermark has passed their event time window. A record that arrives after the watermark has already advanced beyond its event time is considered late and is not emitted. Immediate processing would violate watermark semantics. Thus this option is incorrect for the given timings.

About these practice questions

One of 295 original Databricks-Spark-Assoc practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.