Change Data Feed (CDF) & Incremental Lakehouse Processing
Consume table change feeds to build incremental downstream jobs instead of full reloads.
In plain words
Snapshot + exact starting table version. Next, only committed changes in version range. Finally, durable offset and enough table history.
Think of it like…
CDF is a warehouse's ledger of goods added, replaced, and removed since a bookmarked page, saving downstream teams from recounting the whole warehouse every morning.
Where you’ve seen it
Delta CDF reads _change_type, _commit_version, and _commit_timestamp from version 41 to 45; the target marks a 3-state upsert by source primary key and commits offset 45 only after MERGE succeeds.
Words you’ll hear
- CDF
- A table-level ordered feed of row changes tied to transaction versions in formats or engines that support it.
- Incremental
- A downstream strategy that processes only new or changed keys instead of recomputing a complete dataset.
- Change Feed
- The commit-derived metadata containing operation type, table version, timestamp, key, and before/after values as supported.
- Operational boundary
- Starting from a CDF version without a complete bootstrap duplicates or misses rows, compaction/vacuum can remove required history, and an update row arriving twice produces duplicate effects if the sink is not idempotent. Bootstrap into a reconciled snapshot, persist the last committed table version atomically with the sink, configure CDF/history retention to exceed backlog, dedupe by event/primary key, and replay bounded versions after failure.
Visual diagram
Theory & deep dive
CDF: the working mechanism
A change data feed exposes row-level insert, update, and delete records between table versions so incremental consumers process only affected events while preserving table provenance.
Snapshot + exact starting table version. Only committed changes in version range, then idempotent insert/update/delete semantics; this exposes the state governed by Change Feed.
Delta CDF reads _change_type, _commit_version, and _commit_timestamp from version 41 to 45; the target marks a 3-state upsert by source primary key and commits offset 45 only after MERGE succeeds.
Change Data Feed & Incremental Lakehouse Processing: failure mode and production response
Starting from a CDF version without a complete bootstrap duplicates or misses rows, compaction/vacuum can remove required history, and an update row arriving twice produces duplicate effects if the sink is not idempotent.
Bootstrap into a reconciled snapshot, persist the last committed table version atomically with the sink, configure CDF/history retention to exceed backlog, dedupe by event/primary key, and replay bounded versions after failure. Track Committed version as "checkpoint only after sink commit", and make Retention visible to the dataset owner.
How it works, step by step
Step 1 of 41. Bootstrap
Snapshot + exact starting table version. A change data feed exposes row-level insert, update, and delete records between table versions so incremental consumers process only affected events while preserving table provenance.
- Committed version
- checkpoint only after sink commit
- Incremental
- A downstream strategy that processes only new or changed keys instead of recomputing a complete dataset.
When to use it & trade-offs
What it is
A change data feed exposes row-level insert, update, and delete records between table versions so incremental consumers process only affected events while preserving table provenance. Delta CDF reads _change_type, _commit_version, and _commit_timestamp from version 41 to 45; the target marks a 3-state upsert by source primary key and commits offset 45 only after MERGE succeeds.
Why it matters: Starting from a CDF version without a complete bootstrap duplicates or misses rows, compaction/vacuum can remove required history, and an update row arriving twice produces duplicate effects if the sink is not idempotent. Bootstrap into a reconciled snapshot, persist the last committed table version atomically with the sink, configure CDF/history retention to exceed backlog, dedupe by event/primary key, and replay bounded versions after failure.
When to reach for it
- Consume table change feeds to build incremental downstream jobs instead of full reloads.
- Choose CDF because it provides this capability: A table-level ordered feed of row changes tied to transaction versions in formats or engines that support it.
- Keep evidence for Committed version at "checkpoint only after sink commit" so the last production stage-Checkpoint/retain - durable offset and enough table history-remains testable.
When to avoid or be careful
- Starting from a CDF version without a complete bootstrap duplicates or misses rows, compaction/vacuum can remove required history, and an update row arriving twice produces duplicate effects if the sink is not idempotent.
- Do not conflate Incremental with CDF. The second concept contributes different behavior: A downstream strategy that processes only new or changed keys instead of recomputing a complete dataset.
- Release only after this guardrail is in place: Bootstrap into a reconciled snapshot, persist the last committed table version atomically with the sink, configure CDF/history retention to exceed backlog, dedupe by event/primary key, and replay bounded versions after failure.
CDF / Incremental / Change Feed - roles, limits, and operating cost
Strengths: A table-level ordered feed of row changes tied to transaction versions in formats or engines that support it. A change data feed exposes row-level insert, update, and delete records between table versions so incremental consumers process only affected events while preserving table provenance.
Watch out: Starting from a CDF version without a complete bootstrap duplicates or misses rows, compaction/vacuum can remove required history, and an update row arriving twice produces duplicate effects if the sink is not idempotent.
Strengths: A downstream strategy that processes only new or changed keys instead of recomputing a complete dataset. In this workflow it supports: Apply - idempotent insert/update/delete semantics.
Watch out: The operating cost is real: oldest retained CDF version below oldest consumer checkpoint.
Strengths: The commit-derived metadata containing operation type, table version, timestamp, key, and before/after values as supported. Its output can be checked with Dedupe key.
Watch out: Operating guardrail: Bootstrap into a reconciled snapshot, persist the last committed table version atomically with the sink, configure CDF/history retention to exceed backlog, dedupe by event/primary key, and replay bounded versions after failure.
Interview signals & numbers to know
When this topic comes up
- “Where is the failure boundary for CDF, and how would Committed version reveal it?”
- “Why is Incremental distinct from this behavior: the commit-derived metadata containing operation type, table version, timestamp, key, and before/after values as supported?”
- Production clue: Starting from a CDF version without a complete bootstrap duplicates or misses rows, compaction/vacuum can remove required history, and an update row arriving twice produces duplicate effects if the sink is not idempotent.
- Design probe: Bootstrap into a reconciled snapshot, persist the last committed table version atomically with the sink, configure CDF/history retention to exceed backlog, dedupe by event/primary key, and replay bounded versions after failure.
Benchmarks & rules of thumb
- Committed version
- checkpoint only after sink commit
- Retention
- oldest retained CDF version below oldest consumer checkpoint
- Dedupe key
- table snapshot identity plus source key and operation order
Common mistakes & follow-ups
Common interview mistakes
- Starting from a CDF version without a complete bootstrap duplicates or misses rows, compaction/vacuum can remove required history, and an update row arriving twice produces duplicate effects if the sink is not idempotent.
- Reporting success from a job exit code without checking Committed version and Retention.
- Treating this example as complete without replay, rollback, or access boundaries: Delta CDF reads
_change_type,_commit_version, and_commit_timestampfrom version 41 to 45; the target marks a 3-state upsert by source primary key and commits offset 45 only after MERGE succeeds.
Likely interviewer follow-ups
- How would you prove this contract instead of only checking that the command ran: A table-level ordered feed of row changes tied to transaction versions in formats or engines that support it.
- What does the recovery plan do when this occurs? Starting from a CDF version without a complete bootstrap duplicates or misses rows, compaction/vacuum can remove required history, and an update row arriving twice produces duplicate effects if the sink is not idempotent.
- When is CDF insufficient for Retention, and what does adding Incremental cost in Committed version?
Knowledge check
Put it into practice
Practice related interview Q&A
Apply Change Data Feed (CDF) & Incremental Lakehouse Processing with data engineer interview Q&A and hands-on practice.