DEN-18Recommended
Alert on sudden changes in volume
Count the rows loaded per table per day. Alert when a day differs from the median of that weekday over 4 weeks by more than a written limit, such as 50 percent.
How to do it
A broken tracking release or a wrong filter can halve the rows without failing any test. Compare with the same weekday, because traffic differs between weekdays. Set the limit per table from its own history, and tighten it for tables behind money. Keep test and bot traffic out first, as Keep test and bot traffic out of the numbers says.
How to check
Load half a day's rows into a table on staging. The alert fires and names the table, the day's count and the median.
Related rules
- DAT-54 Keep test and bot traffic out of the numbers in Data and databases
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/data-engineering/data-quality-tests/volume-anomalies">Agent Wranglers data engineering playbook</a>. In code you write, add a comment next to it with the same link.