Courseiva

Databricks-DE-Pro Data Ingestion and Acquisition Practice Question

A data engineer is ingesting streaming data from Apache Kafka into a Delta table using Databricks Structured Streaming. The engineer wants to ensure exactly-once processing and handle late-arriving data. Which combination of features should the engineer use?

⚠ Common exam trap

The trap here is thinking that consumer group settings or write modes alone can ensure exactly-once; checkpointing and watermarks are fundamental for stateful stream processing.

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

✓

Enable checkpointing and use watermarks with a time-based window.

Exactly-once processing in Structured Streaming requires reliable checkpointing to track offsets and state. Watermarks are used to handle late-arriving data by defining a threshold beyond which data is dropped, and they enable state cleanup for windowed operations. Combining checkpointing with watermarks provides both exactly-once semantics and late data handling, making it the correct approach for ingesting Kafka data into Delta.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Set the Kafka consumer group ID to a unique value and use foreachBatch to write to Delta.

    Why it's wrong here

    A unique consumer group ID helps with offset management but does not guarantee exactly-once processing by itself. Using foreachBatch allows custom logic but requires additional idempotent writes to achieve exactly-once. Without checkpointing, the stream cannot recover state reliably. This combination does not address late data handling or exactly-once semantics as robustly as checkpointing with watermarks.

  • ✓

    Enable checkpointing and use watermarks with a time-based window.

    Why this is correct

    Checkpointing ensures exactly-once processing by storing the offset and state information reliably, allowing recovery without reprocessing. Watermarks define how late data can arrive and still be processed, enabling the engine to drop overly late data and manage state. Together, they provide exactly-once semantics and handle late data in windowed aggregations, which is essential for reliable streaming ingestion from Kafka.

  • ✗

    Configure the Delta table with mergeSchema enabled and use append mode for writes.

    Why it's wrong here

    Enabling mergeSchema allows schema evolution during writes, and append mode adds new data. However, these features do not guarantee exactly-once processing; without checkpointing, failures could lead to duplicate writes. They also do not handle late data or manage state for aggregations. This approach focuses on schema and write mode, not on the core requirements of exactly-once and late data handling.

  • ✗

    Use the Kafka source with startingOffsets set to earliest and enable auto.offset.reset to latest.

    Why it's wrong here

    Setting startingOffsets to earliest and auto.offset.reset to latest controls where the stream starts reading but does not provide exactly-once processing or handle late data. These are consumer configuration options for initial offset positioning. They do not manage state or checkpointing, and without watermarks, late data cannot be properly handled in aggregations.

About these practice questions

One of 267 original Databricks-DE-Pro 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-DE-Pro 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-DE-Pro exam.