Shop / Ebook

Change Data Capture from Scratch
From database changes to history tables with SQL and Python
A parcel company copies its database every night, and loses every status change, every cancelled parcel and every customer's old address. Build change data capture from scratch: snapshots, timestamps and the database log, replicas that stay exact, history you can query at any moment, and the real tools at the end. Every result in the book is real output.
What's inside
- Why nightly copies lose history, deletes and changes in between
- Snapshot diffs and timestamp extraction, and the traps in each
- Reading the database log: LSNs and the Debezium event format
- Applying events to replicas with upserts, MERGE and offsets
- Duplicates, events out of order and tombstones
- SCD Type 2 history and point-in-time joins from events
- Schema changes, streaming with partitions and consumer groups
- Testing and reconciling CDC against the source
- Postgres, Debezium and Kafka with Docker
- Case study: two weeks of parcels, answered and proven
You might also like

Data Engineering from Zero
Build your first reliable data pipelines with SQL and Python
See what's inside →
Pipelines That Never Double Count
Idempotent loads, late data and safe backfills
See what's inside →
Make the Numbers Match
Reconciling reports with their source, down to the cent
See what's inside →
GDPR Deletion for Data Engineers
Erasing personal data from tables, files, history and backups, with proof
See what's inside →