1. A data engineer is building a DLT pipeline that reads from an external Kafka topic. They declare the ingestion table using `dlt.create_streaming_table()` and use `spark.readStream` to pull from Kafka. Several weeks later, the pipeline is paused for maintenance. When the pipeline restarts, what ensures that the pipeline resumes processing from where it left off rather than reprocessing all Kafka messages from the beginning?
- A. The DLT pipeline's built-in checkpoint management, which automatically persists read offsets and stream state in the pipeline's storage location✓ Correct
- B. Kafka's consumer group offset retention, which keeps the last committed offset so any Spark consumer can resume automatically without any Spark-side state
- C. The Delta transaction log of the target streaming table, which records the last micro-batch ID and is used by Spark to resume the stream
- D. Setting `startingOffsets` to `latest` in the Kafka read options, which causes the stream to always resume from the newest available message
Explanation
DLT automatically manages checkpoints for all streaming sources in the pipeline. Checkpoint data — including Kafka partition offsets and any aggregation state — is stored in the pipeline's configured storage location. When the pipeline restarts, it reads the checkpoint to resume exactly where it left off. Option B is partially true (Kafka does retain consumer group offsets), but Spark Structured Streaming does NOT rely on Kafka's consumer group offset mechanism for resumption; it uses its own checkpoint files, making B insufficient and misleading. Option C is incorrect: the Delta transaction log tracks table-level write transactions, not Kafka read offsets; the checkpoint directory is separate from the transaction log. Option D is the opposite of what is needed — `startingOffsets=latest` would skip all messages that arrived during the pause, causing data loss.