Topic 5 of 5 · 5 min read
Detecting and handling data incidents
Goal: Pick the monitors that would catch a given silent data failure and draft the notice to its consumers.
A data incident is any time a table is wrong, late or missing and someone may have acted on it, and the job has two halves: catch it before consumers do, and tell them exactly what was affected. The dangerous failures are silent. The job succeeded, the table exists, the numbers are wrong.
Check yourself · 1 of 3
A load succeeds, but one country's rows are missing. Which monitor is most likely to catch it?
Why it matters
A crashed pipeline is loud. Far more costly are the quiet ones: a source stops sending one region, a join drops half the rows, a currency field flips to cents. Dashboards still load. People decide on bad numbers for days, and an AI agent quotes them without a doubt.
Four monitors that cover most cases
- Freshness. When did the table last update? Compare with the target in the ownership entry. In dbt, source freshness takes a
warn_afteranderror_afterperiod. - Volume. Row count per load against its normal range. A drop from the usual daily rows to a fraction of it is the signal for a partial load.
- Schema. Columns added, removed or retyped. A contract catches this at build time; a monitor catches it from outside sources.
- Distribution. Null rate, distinct counts, min, max and averages of key columns. This catches the cents-for-euros change and the sudden surge of nulls that pass type checks.
Tools such as Great Expectations, dbt tests and Elementary run these checks inside the pipeline, and anomaly detection compares each value with its own history instead of a fixed number.
Alerts that people act on
Send each alert to the table's owner, with the table, the check that failed, the value seen against the expected one, and a link to the lineage. Too many alerts teach people to ignore them, so start with the checks on the tables that feed decisions.
The incident note
When consumers may have used bad numbers, tell them:
Subject: orders_daily revenue wrong 3-5 Dec, fixed 6 Dec
What: revenue in orders_daily was too low for 3 to 5 Dec because the EU feed was missing.
Affected: finance dashboard, weekly board pack, revenue forecast.
Now: data reloaded on 6 Dec 09:10 UTC; numbers are correct.
Action: re-export anything saved from 3-5 Dec. Contact: payments-analytics.
It names which numbers, which dates, who is affected and what to do.
What goes wrong
- Only checking that the job ran. Success status says nothing about content.
- Fixed thresholds on seasonal data. A weekend drop pages the owner every Sunday. Compare with the same weekday.
- Fixing quietly. If you reload without a note, people who already acted on the wrong numbers never learn it.
Examples
A missing region
A feed stops sending Germany. The load succeeds and the schema is the same. Freshness passes. Volume drops well below its usual range, and a distribution check on country shows one value vanished. Volume plus distribution catches it the same morning.
The silent unit change
A source starts sending amount in cents. Types match, row counts match and the table is fresh. Only a distribution check, comparing the average amount with its history, catches a jump to about 100 times normal.
Key points
- The costly failures are silent: the job succeeds but the data is wrong, partial or late.
- Freshness, volume, schema and distribution monitors together catch most silent failures.
- Anomaly detection against a table's own history handles seasonality better than a fixed threshold.
- An alert should reach the owner with the check, the value seen, the expected value and a lineage link.
- An incident note says which numbers were wrong, since when, who is affected and what to do now.
Common mistakes
- Monitoring only whether the job succeeded, not what it produced.
- Using one fixed threshold on data with weekly or seasonal patterns.
- Alerting everyone on every table, so people learn to mute the channel.
- Fixing the data without telling consumers which numbers were wrong and when.
Check yourself · 2 of 3
A source starts sending amounts in cents instead of euros. Which check catches it?
Check yourself · 3 of 3
A table was wrong for three days and is now fixed. What should the owner do next?
Practice items, not counted towards your mastery.
Start here
- dbt model contracts (opens in a new tab)DocsFree
How a dbt contract enforces column names and data types at build time.
- Open Data Contract Standard (opens in a new tab)StandardFree
The YAML contract format: schema, quality rules, SLAs and ownership fields in one file.
- OpenLineage (opens in a new tab)StandardFree
An open standard for lineage events from jobs, runs and datasets, with the spec and integrations.
More for this topic
- dbt source freshness (opens in a new tab)DocsFree
How to set warn and error freshness thresholds on a source table.
- Great Expectations documentation (opens in a new tab)DocsFree
Open-source data validation: expectations, checkpoints and validation results you can run in a pipeline.
- Elementary data observability (opens in a new tab)ToolFree
An open-source monitor for freshness, volume and anomaly tests inside dbt projects.