Stage 2
Stage 2: Data Integration
Goal: Move data between a customer's systems correctly: resilient API clients, honest cleaning, idempotent loads, and pipelines that run every day. Time: ~2–3 weeks at 30–60 minutes a day.
By the end of this stage you can:
- Fetch everything from a rate-limited, imperfect API without losing a row
- Turn a messy export into validated records plus a quarantine report
- Load idempotently with upserts and prove source and target agree
- Run it all as an incremental, observable, re-runnable pipeline
How to study
- Read one part at a time, in order.
- Run every example yourself (
PYTHONPATH=tools .venv/bin/python stage-2-data-integration/part-05-working-with-customer-apis/examples/01_....pyfrom the repo root). The output in the lesson came from a real run; yours should match. - Do the exercises before looking at the solutions.
- Finish the mini-project at the end of each part, then the stage project.
Parts
| Part | Area | You will build | Time |
|---|---|---|---|
| 5 | Working with customer APIs | An API client that survives auth, pagination, 429s and 503s | ~3.5 h |
| 6 | Messy data | The Acme cleaning job with a quarantine report | ~3.5 h |
| 7 | SQL and data modeling for integrations | An idempotent upsert load with reconciliation | ~3 h |
| 8 | Pipelines | A scheduled incremental sync with watermark and run report | ~3 h |
Stage project
Acme Shipments Pipeline — extract through retries, clean and validate with quarantine, load idempotently, reconcile — one pipeline, at Core, Stretch and Production levels.
The practice customer
The simulated Acme API (bearer auth, pagination, a 429 with Retry-After, one transient 503) and the messy export both live in tools/fdelab.py. Every failure path in this stage is real and reproducible offline.