Data quality & contracts
Not-null/unique/accepted-values/freshness checks (dbt tests, Great Expectations), anomaly detection on volume, quarantine patterns, data contracts with producers. Quality is checked in-pipeline, not discovered in dashboards.
The mental model
Data quality is a smoke detector wired into the pipeline, not a fire inspector who visits after the building burns down. The failure mode that data quality exists to prevent is silent: a pipeline keeps running, the dashboard keeps rendering, and the numbers are quietly wrong for days until someone with authority notices and asks "why did revenue drop 30% on Tuesday?" By then the bad data has fanned out into every downstream model, report, and ML feature, and you are doing archaeology instead of catching a break.
The analogy that sticks: manufacturing quality control. A factory does not ship every product and wait for returns; it puts inspection gates on the line so a defective part is caught and pulled *before* it is assembled into something expensive. In data, the gate lives in the pipeline: after a load and before anything downstream reads it, you assert the data is shaped correctly, and if it is not, you fail the run and page someone rather than publishing garbage. Quality is checked in-pipeline, not discovered in dashboards — that phrase is the whole discipline.
The WHY that reframes everything: bad data is worse than no data. A pipeline that fails loudly leaves yesterday's correct numbers in place and pages an engineer; a pipeline that succeeds with bad data replaces correct numbers with wrong ones and pages no one. So the goal of a quality gate is not to make the pipeline never fail — it is to make it fail *at the right moment*, before the corruption spreads, converting a silent multi-day incident into a loud five-minute one. And the ambition scales: from single-column tests (this must be unique), to statistical checks (this volume looks anomalous), to data contracts — a schema-and-semantics agreement with the upstream producer so breakage is caught at the source, not inferred three layers downstream.
- Deep dive
- Internal architecture
- Real-world use cases
- Best practices
- Common mistakes
- Performance
- Security
- Production troubleshooting
- Advantages & disadvantages
- Alternatives
- Interview expectations
- Interview questions
- Facts to remember
- Cheat sheet
- Quick revision