Courseiva

Databricks-DE-Pro Data Ingestion and Acquisition Practice Question

A data engineer is ingesting data from an Apache Kafka topic into a Delta Lake table using Structured Streaming. The Kafka topic receives messages with a timestamp field in the value payload, but the ingestion must handle late-arriving data and produce correct aggregations. The engineer wants to ensure that watermarks are applied correctly. Which approach should be used?

⚠ Common exam trap

The trap here is assuming that the Kafka timestamp or processing time can be used for watermarks, but event-time watermarks must be based on the actual event timestamp from the payload.

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

✓

Parse the timestamp field from the Kafka value payload, cast it to a timestamp, and apply a watermark on that column.

For correct event-time processing with Kafka and Delta Lake, the event timestamp must come from the message payload, not from Kafka metadata or processing time. Parsing that field and applying a watermark on it enables Structured Streaming to manage late-arriving data accurately. This ensures that aggregations and stateful operations reflect the true event time and that late data is handled according to the defined watermark.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Use the Kafka timestamp column provided by the Kafka source, and apply a watermark on that column.

    Why it's wrong here

    The Kafka timestamp column represents the time the message was written to the Kafka broker, not the event time from the payload. Applying a watermark on this column may not correctly handle late-arriving data based on the actual event time. The scenario specifies that the payload contains a timestamp field that should be used for event-time processing. Therefore, using the Kafka timestamp would not satisfy the requirement for accurate late-data handling.

  • ✗

    Use the current_timestamp() function to generate a processing-time column and apply a watermark on that column.

    Why it's wrong here

    Using current_timestamp() creates a processing-time column, which reflects when the data is processed, not when the event occurred. Watermarking on processing time does not handle late-arriving data based on event time; it would incorrectly treat all data as on time. The scenario requires handling late data based on the event timestamp in the payload, so this approach is incorrect.

  • ✓

    Parse the timestamp field from the Kafka value payload, cast it to a timestamp, and apply a watermark on that column.

    Why this is correct

    To correctly handle late-arriving data based on event time, the watermark must be applied on the event-time column derived from the payload. Parsing the timestamp field, casting it to a timestamp type, and then applying a watermark on that column allows Structured Streaming to track event time and drop or update late data according to the watermark threshold. This is the standard approach for event-time processing with Kafka and Delta Lake.

  • ✗

    Set the Kafka source option 'startingOffsets' to 'earliest' and rely on the default watermark.

    Why it's wrong here

    Setting startingOffsets to 'earliest' only controls where to start reading from the Kafka topic; it does not define an event-time column or a watermark. Structured Streaming does not have a default watermark; one must be explicitly defined. Without a watermark on the event-time column, late data will not be handled correctly. Thus, this option does not meet the requirement.

About these practice questions

This Databricks-DE-Pro question is part of Courseiva's 267-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-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.