README.md/case studies/c5 aec pipeline
Case study 05 / Data engineering Open source
Four public data sources, one Snowflake star schema
A personal, open-repo pipeline that conforms four live public sources into a single medallion star schema, and proves it with tests, entity resolution, and logged quality checks.
At a glancec5 / aec pipeline
- Type
- Personal project
- Sources
- 4 live, public
- Target
- Snowflake star schema
- Tests
- 358 pytest
- Stack
- Python, SQL, Snowflake, pytest [CONFIRM: any other tools in the repo]
On this page
01Problem
Public infrastructure opportunities are published in four different shapes: the SAM.gov API, a Nebraska DOT PDF, a City of San Diego CIP CSV, and the Texas DOT Socrata API.
The same project can appear in more than one of them, so counting records is not the same as counting opportunities.
Placeholder[CONFIRM: who the pipeline is for and what question it answers, in one sentence.]
02Constraints
- The sources are live and public, and they arrive as an API, a PDF, a CSV, and a Socrata API.
- All four have to land in one Snowflake medallion star schema.
- A wrong merge is worse than a missed one, so false merges have to stay at zero.
- [CONFIRM: refresh cadence, data volume, and any rate limits or licensing terms.]
03Approach
Three steps, each checkable.
- Ingest. Four live public sources: SAM.gov API, Nebraska DOT PDF, City of San Diego CIP CSV, Texas DOT Socrata API.
- Conform. Everything lands in one Snowflake medallion star schema.
- Resolve and check. Entity resolution collapses duplicates, and 55 data-quality checks are logged on every load.
04Decision
One Snowflake medallion star schema for all four sources. Conforming the API, PDF, CSV, and Socrata feeds into a single model means every question is asked once, against one shape.
[CONFIRM: why this was not chosen.]
[CONFIRM: reasoning.]
Four sources conformed into one model.
05Evaluation
358 pytest tests cover the code. 55 data-quality checks are logged on every load, so a bad load leaves a record.
Placeholder[CONFIRM: two or three example checks, and how entity-resolution false merges are measured.]
06Result
Four live public sources in one star schema, with 358 tests behind it. The code is open: github.com/Ned-Ibrahim/aec-pursuit-model.
07What I'd do next
- Show the quality log. Surface the 55 per-load checks as a visible trend, so drift shows up before a user notices.
- Add a fifth source. The same ingest, conform, resolve path should take another public feed without changing the model. [CONFIRM: which source.]
- Document the merge rules. Write down why 1,957 became 1,952, so the zero-false-merge claim can be audited.