Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. What is CDC?

Data platform · Platform Concepts

What is CDC?

Mediumplatform-18
CDCDebeziumOLTPstreaming

Question

What is Change Data Capture (CDC)?

Solution

CDC streams database changes (inserts/updates/deletes) from OLTP systems into downstream systems, often via the database transaction log.

Postgres WAL -> Debezium -> Kafka -> warehouse / search / cache

Why CDC beats nightly full dumps

  • Lower latency
  • Less load than repeatedly scanning whole tables
  • Captures deletes and updates
  • Preserves change order (with care)

Tiny example

An orders row status flips placed → shipped. CDC emits an update event; the warehouse merges it into orders_current and maybe appends to orders_history.

Caveats

Schema changes, tombstones/deletes, initial snapshots, and exactly-once merges into sinks all need design.

Interview tip: "CDC reads the transaction log to emit row-level changes." Name a tool chain (Debezium + Kafka) if you know one.

PreviousNext