Level 7 / Project 10 - Multi Source Reconciler¶
Home: README
Learn Your Way¶
| Read | Build | Watch | Test | Review | Visualize | Try |
|---|---|---|---|---|---|---|
| — | This project | — | — | Flashcards | — | — |
Focus¶
- compare source snapshots for divergence
Why this project exists¶
This project gives you level-appropriate practice in a realistic operations context. Goal: run the baseline, alter behavior, break one assumption, recover safely, and explain the fix.
Run (copy/paste)¶
Use <repo-root> as the folder containing this repository's README.md.
cd <repo-root>/projects/level-7/10-multi-source-reconciler
python project.py --input data/sample_input.txt --output data/output_summary.json
pytest -q
Expected terminal output¶
Expected artifacts¶
data/output_summary.json- Passing tests
- Updated
notes.md
Alter it (required)¶
- Add a
toleranceparameter for numeric comparisons (e.g. prices within 0.01 count as matching). - Add a
reconcile_three()function that compares three sources simultaneously. - Re-run script and tests — verify tolerance and three-way reconciliation work.
Break it (required)¶
- Use a key field that does not exist in any records (e.g.
"nonexistent_id"). - Compare records where one side has duplicate keys.
- Observe empty results or last-write-wins behavior with duplicates.
Fix it (required)¶
- Validate that
key_fieldexists in at least one record before proceeding. - Log a warning when duplicate keys are found in a single source.
- Add tests for missing key fields and duplicate-key scenarios.
Explain it (teach-back)¶
- Why is set-based reconciliation the right approach for comparing data sources?
- What happened when the key field did not exist in the records?
- How did the validation prevent silent empty results?
- Where is data reconciliation used in real financial or inventory systems?
Mastery check¶
You can move on when you can: - run baseline without docs, - explain one core function line-by-line, - break and recover in one session, - keep tests passing after your change.
Related Concepts¶
| ← Prev | Home | Next → |
|---|---|---|