A dashboard is only as honest as the data behind it.
This lab takes duplicated, API-shaped readings and turns them into one tested daily table. Every assumption is visible. Every failure is reproducible.
01 · The pipeline
Small enough to inspect.
Real enough to discuss.
The goal is not a flashy dashboard. It is a clear chain of trust from source to decision.
Messy input
57 source rows, including one deliberate late-arriving duplicate.
Typed and deduplicated
A documented grain, explicit casts, and a deterministic winning record.
Ready to publish
One daily row plus a quality gate that stops unreliable output.
Daily AQI pattern
Illustrative values exported directly from mart_daily_air_quality.
02 · Broken Model Clinic
Don’t watch a demo.
Investigate a failure.
A 35-minute meetup exercise that turns three silent data problems into team conversations.
Open the exercise files ↗
The number that doubled
A source retry creates a duplicate. Teams define the grain, choose the winning copy, and write the test.
Concept · uniquenessThe day that disappeared
A daily average still looks valid after one expected row vanishes. Teams test completeness, not just nulls.
Concept · data contractsThe chart that still looked fine
A negative reading hides inside a believable average. Teams turn domain knowledge into a build-breaking assertion.
Concept · business tests03 · What this proves
Trust is a workflow,
not a badge.
Reproducible
The seed is generated by a deterministic script, so every contributor begins with the same problem.
Tested
Schema and singular tests cover identity, allowed values, completeness, and physically impossible readings.
Documented
Every public model describes its purpose, grain, owner, and downstream exposure.
Reviewable
GitHub Actions runs the complete dbt build on every pull request before changes can be trusted.
The useful question is not, “Did the chart render?” It is, “What had to be true before we allowed it to render?”
That is the conversation this project is built to start—in a repository, in a review, and eventually in a dbt Indore room.