Upstream changed what a column means and nothing broke, we just reported wrong numbers for a week
A source system started populating a status field with a new value we had never seen. Our transformation has a case statement that maps known values and defaults everything else to one bucket.
So nothing failed. No job errored, no alert fired, no schema check tripped because the column type did not change. The pipeline ran green every night and the dashboard was wrong for eight days until somebody in finance queried a total.
This frightens me more than an outage would, because an outage is visible.
What do people put in place for this? Schema tests clearly are not enough, and I cannot write an assertion for every possible thing a source might do.
@freshness_and_row · 3w ago
Adding the layer above tests, because tests only catch what you predicted: monitor the outputs for shape, not just the inputs for validity.
The things worth alerting on, in rough order of how often they catch something:
Row counts per day, per important table, against a rolling baseline. A twenty percent move should tell somebody.
Distribution of key categorical columns. If a status field is normally sixty percent one value and it becomes thirty, that is exactly your incident and it is visible in a chart nobody had.
Null rates per column. A field that silently stops being populated is extremely common and produces no error anywhere.
The business metric itself, day over day. Revenue, orders, signups. This is the last line of defence and it is what your finance colleague was doing manually.
The reason this catches things tests do not: you are asking has anything changed rather than is this specific thing wrong. Most silent data incidents are a distribution shift, not a validation failure.
It does not need to be sophisticated. A daily query writing counts and distributions into a table, and a simple threshold alert, catches a remarkable amount. The people with elaborate anomaly detection mostly caught the same things the simple version would have.
Reply
Report