Stage 5 track
Track B: Data Integration FDE
Goal: Own the hardest data problems: sources that change under you, quality that must be enforced, and backfills measured in months of history. Builds on: Stage 2 end to end; the pipeline grows into a multi-source hub.
What you learn
- Change data capture — capturing inserts, updates and deletes from a source as they happen, often from its transaction log. CDC avoids repeated full reloads — and catches deletes, which watermark syncs (Part 8) usually miss.
- Schema drift — detecting and handling changing sources before they break the pipeline.
- Data quality rules — blocking vs warning checks: decide per check whether it stops the load or only alerts.
- Large backfills — throughput, rate limits, resumability: Part 8's chunk-and-checkpoint discipline at month-of-history scale.
- Data contracts — agreeing schemas with source owners, so drift becomes a conversation before it becomes an incident.
- Lineage and documentation — where each field came from, transformation by transformation; the answer to "why does this dashboard number differ from the source?"
Executed examples
Both ran in this repo; outputs are from those runs.
Detect schema drift before it breaks the pipeline (examples-track-b/01) — compare each incoming record's shape against the expected schema; a renamed column shows up as one missing plus one new:
missing columns: ['weight_kg']
new columns: ['eta', 'weight']
type changes: {}
Data quality checks with a pass/fail report (examples-track-b/02) — five named checks against the raw Acme export, and the honest scoreboard:
[FAIL] shipment_id is unique
[FAIL] no missing weight
[FAIL] no negative weight
[PASS] status in allowed set
[FAIL] customer has no stray spaces
1/5 checks passed
🧪 Quick quiz — answer from memory, then check.
- An incoming record has
weightinstead ofweight_kgand a newetafield. What is this?
Show the answer
Schema drift. The drift check reported weight_kg missing and eta and weight as new columns. (verified against the example output above)
- How many of the 5 data-quality checks passed on the raw Acme export?
Show the answer
1 — only "status in allowed set" passed; duplicates, missing and negative weights, and stray spaces failed. (verified against the example output above)
- What should happen when a data-quality check fails in production?
Show the answer
Stop or quarantine the batch, alert the owner, and keep the bad data out of trusted tables. Decide per check whether it blocks the load or only warns.
- What is change data capture (CDC)?
Show the answer
Capturing inserts, updates and deletes from a source as they happen, often from its transaction log. CDC avoids repeated full reloads and also captures deletes, which watermark syncs usually miss.
Capstone: Multi-source Acme Data Hub
- Core — integrate the API, the CSV export and one more source into one validated model.
- Stretch — add schema-drift detection, data-quality gates and a resumable backfill.
- Production — add data contracts with each source owner, lineage docs and freshness alerts.
Read more: pandas user guide · Debezium (CDC) docs