skip to content

Change Data Capture (CDC)

How committed changes in an operational database become a stream that other systems can consume, without asking the application to publish anything. CDC is the standard answer to "how do you keep the warehouse and the search index in sync with production?", so interviewers probe both the capture mechanism and the guarantees it gives you downstream.

on this pageshow

explore

questions

page 2 of 2

Why does trigger-based change capture add write cost and risk to the source database?

level: middleimportance: nice to knowfreq 40%

basics

~20 s

Row triggers fire inside the application's own transaction and write an extra audit row per change, so every write becomes two. Commit latency, lock duration, log volume and failure surface all grow, and the audit table needs its own drain and purge.

open as a page

When should Debezium's outbox router expand a JSON payload column into a typed structure?

level: middleimportance: nice to knowfreq 24%

basics

~20 s

Expand it when consumers need a real schema for the event body — typically with a registry-backed converter. Leave it as a string when the payload's shape varies between events, because the structure is inferred per record and inconsistent shapes produce unstable schemas.

open as a page

In Debezium, what does snapshot.select.statement.overrides change about a table's snapshot?

level: middleimportance: nice to knowfreq 28%

basics

~20 s

It replaces the default SELECT that reads a table during the snapshot with a statement you supply, so you can filter rows or restrict columns. It affects the snapshot only; streaming afterwards still captures every change to that table.

open as a page

What breaks in a CDC sink when the source updates the column used as the row's key?

level: seniorimportance: nice to knowfreq 28%

basics

~20 s

The row's history is keyed by the old value and its new event by the new one, so the sink upserts a fresh row and leaves the old one behind as an orphan. Key on an immutable identifier instead.

open as a page

How does a watermark-based incremental snapshot backfill a table while the CDC stream keeps running?

level: seniorimportance: nice to knowfreq 38%

basics

~20 s

The connector writes a marker into the log, reads one key-range chunk, writes a second marker, then drops from the chunk any key that changed between the markers — the live stream already carries the truth for those. Streaming never pauses.

open as a page

When would you run Debezium Server or the embedded engine instead of Debezium on Kafka Connect?

level: principalimportance: nice to knowfreq 30%

basics

~20 s

Debezium Server is a standalone process that streams change events to non-Kafka sinks; the embedded engine is a library running inside your own application. Choose them when there is no Kafka Connect cluster, accepting that you own restarts, scaling and offset storage.

open as a page

showing 31–36 of 36