Skip to content

Diogo TravassosData leadership · Analytics · Decision-making

Public dataSynthetic faults

Data quality scorecard · alerts and on-call

Self-test on 30 faults: paging on every failed check let 5 reach a viewer first, routing by severity 13; 0 false pages a week either way, 320 pages against 155.

The scorecard's checks ran every morning of one month, one fault at a time. Paging on every failed check told an owner at 06:30, before the 09:00 views by the schedule's design, on all 25 faults any check caught; the 5 that still reached a viewer first are the 5 no check caught. Routing by severity, one author's rule, sent value faults (missing fares, durations, flags, a date shift) to a ticket read at 10:00 on a weekday, after the first wrong view on 8 of them. Paging only on critical models let 24 through, because most checks that catch faults sit on the landing table. No rule paged on the clean month.

Key figures
Reached a viewer before an owner was told5 vs 13 of 27every check pages against routing by severity, of the faults with a wrong view; the 5 under every-check paging are the faults no check caught; paging only on critical models 24, digest only 27Pages per caught fault over the month12 vs 1 medianwith no fix, every morning a check fails; on the first morning 2 vs 1 (at most 5 vs 4); 0 false pages on the clean month under every ruleWrong views left unmarked242 / 606 / 48load anyway, stop the refresh, quarantine and mark, summed over the 30 faults; the quarantine took 4,698 rows, all of them rows a fault added or changed and none on the clean month, but left a month total worse than loading on 11 faultsHours from landing to the first owner told5.5 h medianthe same under routing by severity; 9 h paging only on critical models; 32.5 h digest only, with 10 never told by the end of the month against 5

Main limitation One author wrote the severities, routes, timings and row rules, knowing which checks fired in the earlier rounds, so every routing result is a self-test of one policy. 30 faults on one month of 10,000 public trips, one at a time, with owners who always act on time. A page beats the 09:00 views by construction; the page counts are its price.

Who heard first, by routing rule

Paging on every failed check let through only the faults no check caught; routing by severity let through value faults routed to a ticket.

Faults whose first wrong dashboard view came before any owner was told, of the 27 faults with a wrong view.

Caught by no checkCaught, but told after the view

Faults that reached a viewer before an owner was told, of 27, by routing rulePage on every failed check: 5 of 27; Page only on critical models: 24 of 27; Route by severity: 13 of 27; Digest only: 27 of 27.0510152025Faults that reached a viewer first, of 27Page on every failed check: 5 of 27 faults reached a viewer first (5 of them caught by no check); 25 of 30 faults paged, 320 pages over the month with no fix; median 5.5 h from landing to the first owner told, 5 never told; 0 pages on the clean monthPage on every failed check5Page only on critical models: 24 of 27 faults reached a viewer first (5 of them caught by no check); 3 of 30 faults paged, 22 pages over the month with no fix; median 9 h from landing to the first owner told, 5 never told; 0 pages on the clean monthPage only on critical models24Route by severity: 13 of 27 faults reached a viewer first (5 of them caught by no check); 15 of 30 faults paged, 155 pages over the month with no fix; median 5.5 h from landing to the first owner told, 5 never told; 0 pages on the clean monthRoute by severity13Digest only: 27 of 27 faults reached a viewer first (5 of them caught by no check); 0 of 30 faults paged, 0 pages over the month with no fix; median 32.5 h from landing to the first owner told, 10 never told; 0 pages on the clean monthDigest only27
Show the data
Each routing rule over the 30 faults
RuleReached a viewer firstFaults pagedPages, no fixPages, clean monthMedian to first toldNever told
Page on every failed check52532005.5 h5
Page only on critical models2432209 h5
Route by severity131515505.5 h5
Digest only2700032.5 h10

Pages count every check routed to a page on every morning it fails, with no fix, so they are an upper bound for a team that fixes faults. Hours run from the fault's landing to the first owner told; the median leaves out faults never told by the end of the month.

The trade is pages against wrong views, not false alarms. No check failed on the clean month, so no rule paged on it, and no fault replay paged on a check that also failed on the clean month. Paging on every failed check sent 320 pages over the 30 replays: a median 2 on the morning a fault was first seen and 12 over the month while nobody fixed it, because one fault trips several checks and they keep failing every morning. Routing by severity sent 155 and paged 15 of the 25 caught faults; the other 10 tripped only warning checks. Paging only on critical models paged 3 faults: the repeated trip IDs reached the unique test on the trips model, and every other catch came from a check on the landing table, which that rule sends to a ticket.

3 faults never changed a tile a dashboard shows (totals rounded or missing a charge, and the second distance field converted twice), so none of them could reach a viewer, whatever the rule.

What each fault did

The first check to fail, the first wrong view, and when an owner heard under the two rules the headline compares. A star marks a fault that reached a viewer first.

The 30 faults, in the order the protocol lists them
FaultFromFirst check to failFirst wrong viewTold, every check pagesTold, by severityPages, every checkPages, by severity
Late dayscorecard faulttrip file arrival, freshness09:00, February 106:30, February 106:30, February 122
Missing-fare spike, January 30scorecard faultmissing fares, missing-fare anomaly09:00, January 3106:30, January 3110:00, January 31 *40
Duplicate loadscorecard faultcontent duplicates, repeated trip ID, unique trip ID09:00, January 3106:30, January 3106:30, January 3166
Units changescorecard faultdistance pair09:00, January 3106:30, January 3106:30, January 3122
Missing fares up 2 pointsscorecard faultnone09:00, February 1never *never *00
Missing fares up 5 pointsscorecard faultmissing-fare anomaly09:00, February 106:30, February 110:00, February 1 *10
Missing fares up 10 pointsscorecard faultmissing fares, missing-fare anomaly09:00, February 106:30, February 110:00, February 1 *20
Missing-fare spike, January 22scorecard faultmissing fares, missing-fare anomaly09:00, January 2306:30, January 2310:00, January 23 *200
Re-sent rows, new IDsscorecard faultcontent duplicates09:00, February 106:30, February 106:30, February 111
Half of January 31scorecard faultday volume, trip file arrival09:00, February 106:30, February 106:30, February 122
Old day reloadedfirst blind settrip file arrival, freshness09:00, January 3006:30, January 3006:30, January 3032
Fare lands in the tip columnfirst blind setmissing fares, missing-fare anomaly09:00, January 2606:30, January 2610:00, January 26 *140
Trips moved to the next dayfirst blind setarrival window, day volume09:00, January 1906:30, January 1906:30, January 19151
Durations in minutesfirst blind setplausible durations09:00, January 1506:30, January 1510:00, January 15 *180
Totals drop a chargefirst blind settotals add upnever06:30, January 1010:00, January 10230
Yesterday's file againfirst blind setday copied09:00, January 2106:30, January 2106:30, January 211212
Distances written as zerofirst blind setcontent duplicates, distance pair09:00, January 1706:30, January 1706:30, January 173232
Flags flippedfirst blind setflag shares09:00, January 2806:30, January 2810:00, January 29 *50
Part of a day loaded twicesecond blind setcontent duplicates, repeated trip ID, unique trip ID09:00, January 2406:30, January 2406:30, January 242727
Trips moved to the next day, againsecond blind setarrival window09:00, January 1206:30, January 1210:00, January 12 *210
Totals rounded to whole dollarssecond blind settotals add upnever06:30, January 2510:00, January 2580
Area codes off by onesecond blind setnone09:00, January 18never *never *00
Durations cappedsecond blind setnone09:00, January 6never *never *00
A missing fare becomes zerosecond blind setnone09:00, January 29never *never *00
Second distance converted twicesecond blind setdistance pairnever06:30, January 1406:30, January 141919
A day loaded before it endedsecond blind setarrival window, freshness09:00, January 2206:30, January 2206:30, January 22121
Late source filelineage source faulttrip file arrival, freshness09:00, January 1906:30, January 1906:30, January 19142
Partition dropped upstreamlineage source faultnone09:00, January 22never *never *00
Backfill delivered againlineage source faultarrival window, content duplicates, day volume, repeated trip ID, unique trip ID09:00, January 2206:30, January 2206:30, January 225544
Partial late filelineage source faultday volume, trip file arrival09:00, January 2506:30, January 2506:30, January 2522

Load, stop or quarantine

Stopping the refresh when a critical check on the landing table failed did the most damage: it stopped on 15 faults, and on the 10 whose check kept failing it never restarted with no fix, so every tile froze, including tiles the fault never touched. Wrong views rose from 242 to 606. Quarantining the rows that broke a row rule and marking the affected days not final left 48 wrong views without a mark, against 242 when loading anyway; the price was 712 views carrying a not-final mark and 465 wrong views in all, because rows taken out are trips missing from the numbers.

On the four duplicate faults the quarantine was clean: it removed the extra rows and every month total came back right, where loading left them 0.3% to 24.6% off. On 11 faults it left at least one month total further from right than loading, and that is the quarantine dropping or hiding real trips. The arrival rule quarantined rows that were late or early but right, such as the January 18 file that landed a day and a half late (355 rows), so those trips never reached the month totals. The distance and totals rules took out nearly whole days whose trips were real and whose only fault was one field. The clean month lost no rows to quarantine, failed no check and had no view marked not final. The clinical data contracts study found a quarantine that let consent withdrawals through; here the same pattern shows up as trips that quietly leave the totals.

Every fault, three ways
Wrong views with no mark and the worst month total error, by refresh mode
FaultUnmarked, loadUnmarked, stopUnmarked, quarantineMonth error, loadMonth error, stopMonth error, quarantineRows quarantined, by ruleWorse than loading
Late day5503.2%3.2%3.2%noneno
Missing-fare spike, January 301100.9%0.9%0.9%noneno
Duplicate load61100.3%6.8%0.0%repeated trip ID 25no
Units change11101.8%6.8%4.0%distance pair 300yes
Missing fares up 2 points1110.1%0.1%0.1%noneno
Missing fares up 5 points1100.2%0.2%0.2%noneno
Missing fares up 10 points1100.3%0.3%0.3%noneno
Missing-fare spike, January 223301.0%1.0%1.0%noneno
Re-sent rows, new IDs3500.6%3.2%0.0%content copy 25no
Half of January 314501.9%3.2%1.9%noneno
Old day reloaded111140.0%0.0%4.0%arrival window 285yes
Fare lands in the tip column3308.3%8.3%8.3%noneno
Trips moved to the next day9960.0%0.0%0.6%arrival window 50yes
Durations in minutes7700.7%0.7%0.9%duration 68yes
Totals drop a charge0000.0%0.0%3.2%totals 267yes
Yesterday's file again377901.6%45.2%1.6%noneno
Distances written as zero1110400.4%59.3%0.6%content copy 1, distance pair 55yes
Flags flipped550121.9%121.9%121.9%noneno
Part of a day loaded twice255801.4%33.7%0.0%repeated trip ID 60no
Trips moved to the next day, again111170.0%0.0%0.9%arrival window 83yes
Totals rounded to whole dollars0000.0%0.0%3.5%totals 298yes
Area codes off by one1110.0%0.0%0.0%noneno
Durations capped7770.2%0.2%0.2%noneno
A missing fare becomes zero1110.0%0.0%0.0%noneno
Second distance converted twice012500.0%68.0%3.9%distance pair 387yes
A day loaded before it ended353501.5%1.5%3.5%arrival window 226yes
Late source file7710.0%0.0%3.9%arrival window 355yes
Partition dropped upstream2020204.9%4.9%4.9%noneno
Backfill delivered again2072024.6%41.3%0.0%repeated trip ID 2213no
Partial late file6700.0%0.0%0.0%noneno

Month error is the largest relative error of the ten metrics' January values on the last morning, against the clean month.

Freshness per source

The table-level freshness check asks how old the newest row is. It failed on 4 faults. The trip file arrival check added here asks whether yesterday's file landed by the check with at least half its usual rows, and failed on 5. Only the arrival check saw the 2 files that landed on time but partly empty (half of January 31, and a third of January 24 with the rest two days later), because their newest row was fresh. Only the freshness check saw the day loaded before it ended, because two thirds of its rows had arrived. The history freshness test never failed: it looks only at the newest load. The zone reference never changed, so its check never failed either. The arrival check and its half bound were declared before the run by the same author who set the routes.

One incident review

The worst fault by wrong metric-days, trips moved to the next day, again, written up as a template a team can lift. Nothing scores it. Download it as text.

Timeline
The file lands at 01:00, January 12. The arrival window check fails at 06:00. The first wrong view, trips yesterday, is at 09:00, January 12. Routed by severity, the ingestion engineer hears through a ticket at 10:00, January 12.
Impact
190 wrong metric-days over the month with no fix, and 11 wrong views on 3 mornings. The month totals stayed right: the trips moved between two days.
Root cause
The last quarter of January 11 is stamped January 12. The rows still landed with their own day's file, before the day they claim had ended.
Sooner
The arrival window check fired before the views; paging it would have told the ingestion engineer at 06:30, January 12. No volume check fired: a quarter of one day moved to the next stays inside the day volume bound.
Follow-up
The ingestion engineer: decide whether rows that land before their day has ended should page, and ask the source why trip dates moved.

A one-page on-call runbook

Written before the replay and published as declared; nothing scores it. Download it as text.

A page arrives (critical check)

  1. Acknowledge within 30 minutes and open an incident note with the check, the trip dates it names and the time.
  2. Before 09:00, put a data warning on every tile that reads the named dates (the lineage page's tile list).
  3. Decide the refresh: let it run, stop it, or quarantine the failing rows, using the table below.
  4. Tell the dashboard owners in one message: what is wrong, which tiles, when it will be right again.

A ticket opens (warning check)

  1. Triage at 10:00 on the next weekday: real change in the world, or a fault in the feed?
  2. If a fault, raise it to an incident and follow the page steps; if real, record why and adjust the check's bound.

The daily digest lists a check (info)

  1. Read it once a day. A bookkeeping identity that fails means the check itself broke: fix the check first.

Choosing what the refresh does

  1. Rows doubled or copied: quarantine the extra rows; the published numbers are right without them.
  2. Rows missing or late: do not stop the refresh; mark the affected days not final until the rows land.
  3. Values that changed meaning (units, totals, durations): quarantine only when the rule cannot catch a real change; otherwise load, mark not final and ask the source.

Closing

  1. Remove the warnings only after the check passes on the morning after the fix.
  2. Write the incident review within two working days: timeline, impact in wrong metric-days, root cause, the check that would have caught it sooner, and who owns the follow-up.

In plain words

A data check that fails at 06:00 does nothing until a person reads it. A page reaches someone before the dashboards are opened; a ticket or a digest reaches them after. Paging on everything got every caught fault to an owner in time, at the cost of several pages per fault every morning it stayed broken. Routing by severity cut the pages by about half and let the value faults, the ones a written rule calls "may be real", reach a dashboard first. When a check fails, stopping the refresh freezes every number; taking out the bad rows and marking the days not final keeps the rest moving but can quietly drop real trips.

What a team should do with it

Limits

Use this at your company

To test the alert routes and refresh policy of a pipeline of your own the same way, paste this prompt into an AI assistant that can read your repository and query your warehouse.

This method comes from Diogo Travassos's study "Data quality scorecard: alerts and on-call" (https://diogotravassos.dev/data-quality-scorecard/alerts-on-call.html). If you can open links, read it first: it works the method through end to end and shows the checks that caught mistakes. The steps below stand on their own if you can't.

Help me decide how the data checks on one of our pipelines should alert people, and what a failing check should do to the scheduled refresh.

Data you need from me: the list of our data checks and what each one tests, who owns each table and dashboard, when each dashboard is read, the schedule of our loads and builds, and at least a month of the landing table with load times.

Method:
1. Give every check one owner, a severity from one written rule (critical when rows a dashboard counts are missing, doubled, misdated or in the wrong unit; warning when a share of values looks off and may be real; info for bookkeeping), and a route: page, ticket or daily digest.
2. Replay the month morning by morning: load what had landed, rebuild the models, run every check, and read every dashboard tile at the time people read it. Do it once clean and once per known fault, one fault at a time.
3. Score at least three routing rules on the same replays: page on every failed check, page only on the models the dashboards read, and route by severity. For each, count the faults whose first wrong dashboard view came before anyone was told, the pages each fault sends, the pages on the clean month, and the hours from a fault landing to the first person told.
4. Replay each fault three more ways when a check fails: load anyway, stop the refresh, and quarantine the rows that break a row rule while marking the affected days not final. Count wrong views with no mark, views marked not final, rows quarantined, and the month totals left wrong.

Checks before trusting the answer:
- Run the checks on the last morning and compare them with any month-end results you already trust; they must agree.
- Count every page and every quarantined row on the clean month; both should be zero, and if not, say which check or rule.
- For every fault the quarantine touched, compare its month totals with loading the rows as they came; a quarantine that makes a total worse is hiding a change.
- Say who chose the severities and whether they knew which checks had fired before.

Report back: per routing rule, the faults that reached a viewer first, the pages per fault and the median hours to the first person told; per refresh policy, the wrong views with no mark and the month totals left wrong; the faults no check caught; and an incident review of the worst fault with its timeline, impact, root cause, the check that would have caught it sooner and the owner of the follow-up.

In your report, say which study you followed and link it: https://diogotravassos.dev/data-quality-scorecard/alerts-on-call.html

Method and checks

The replay

The scorecard's pinned 10,000-row January 2024 sample. Each trip date's file lands at 01:00 the next day unless a fault says otherwise. Every morning at 06:00, from January 2 to February 1, the landing table takes every row landed so far, the scorecard's dbt models rebuild in-process on DuckDB 1.5.6 with the same SQL the lineage part runs, and every check runs. Dashboards are the lineage part's three synthetic dashboards and ten tiles, read at 09:00 on their own schedules. A view is wrong when its tile shows a different value from the clean replay's at the precision it displays. One fault per replay; nothing is fixed during a replay.

The February 1 morning is the scorecard's own month-end snapshot. On it the replay reproduced every failed-check set the scorecard recorded: 28 of 28, for the ten scorecard faults, both blind sets and the clean month.

Checks, owners, severity and routes

The scorecard's version 3 checks as written, plus two per-source arrival checks. Two checks were adapted to a daily clock: source freshness measures the newest row's age at each 06:00 (a failure after 6 hours), and the history freshness test compares with midnight after each morning. Pages go out at 06:30, tickets are read at 10:00 on weekdays, and the daily digest is read at 09:30 on the next weekday.

Every check, its owner, severity and route under each rule
CheckOnOwnerSeverityevery check pagescritical models pageby severitydigest only
arrival windowraw_tripsingestion engineerwarningpageticketticketdigest
content duplicatesraw_tripsingestion engineercriticalpageticketpagedigest
daily sum identitydaily_tripsanalytics engineerinfopagepagedigestdigest
day copiedraw_tripsingestion engineercriticalpageticketpagedigest
day volumeraw_tripsingestion engineercriticalpageticketpagedigest
plausible durationsraw_tripstrip feed ownerwarningpageticketticketdigest
missing faresraw_tripstrip feed ownerwarningpageticketticketdigest
missing-fare anomalyraw_tripstrip feed ownerwarningpageticketticketdigest
trip file arrivalraw_tripsingestion engineercriticalpageticketpagedigest
flag sharesraw_tripstrip feed ownerwarningpageticketticketdigest
freshnessraw_tripsingestion engineercriticalpageticketpagedigest
history freshnesstripsanalytics engineercriticalpagepagepagedigest
month boundarytripsanalytics engineercriticalpagepagepagedigest
no negative unitstripsanalytics engineerwarningpagepageticketdigest
drop-off zone presenttripsanalytics engineerwarningpagepageticketdigest
pickup zone presenttripsanalytics engineerwarningpagepageticketdigest
trip date presenttripsanalytics engineercriticalpagepagepagedigest
trip ID presenttripsanalytics engineerwarningpagepageticketdigest
zone ID presentzonesanalytics engineerinfopagepagedigestdigest
zone name presentzonesanalytics engineerinfopagepagedigestdigest
zone referenceraw_zonesingestion engineerinfopageticketdigestdigest
drop-off zone knowntripsanalytics engineerwarningpagepageticketdigest
pickup zone knowntripsanalytics engineerwarningpagepageticketdigest
row count identitytripsanalytics engineerinfopagepagedigestdigest
repeated trip IDraw_tripsingestion engineercriticalpageticketpagedigest
totals add upraw_tripstrip feed ownerwarningpageticketticketdigest
unique trip IDtripsanalytics engineercriticalpagepagepagedigest
unique zone IDzonesanalytics engineerinfopagepagedigestdigest
distance pairraw_tripstrip feed ownercriticalpageticketpagedigest
Row rules for the quarantine
  • schema: a field fails its staging cast (trip date, numbers, flags, zone codes)
  • repeated trip ID: its trip ID already landed; the first landed copy (landing time, then file order) stays
  • content copy: every field but the trip ID (and landing time) equals an earlier landed row's on the same trip date
  • distance pair: abs(trip_miles * 1609.344 minus audit_distance_meters) > 0.000001, or either is empty
  • negative or empty units: trip_seconds or trip_miles empty or negative, or fare or tip negative
  • totals: fare present and abs(trip_total minus (fare + tip + additional_charges)) > 0.01, empty tip and charges as 0
  • duration: trip_seconds <= 0, or trip_miles > 1 and miles per hour > 100
  • outside the month: trip date outside January 2024
  • arrival window: landed before its trip date ended or more than 36 hours after

A row breaks the first rule it meets in this order. A trip date is not final when the quarantine holds rows of it or a failing check names it; a failing check that names no date marks every date.

Faults

The scorecard's ten single-fault scenarios, the eight faults of each blind set, and four of the lineage part's source faults about how files arrive. The scenario with all four designed faults at once was left out. A fault's landing time is the earliest landing of any row it adds, removes or changes.

Decided before the run, and what changed

The design, the protocol, the severities, routes, timings, row rules, runbook, measures and seven predictions were committed before any code computed a fault's outcome. Seven readings of steps the protocol left open were committed with the code, after development runs that compared only the February 1 morning with the scorecard's records. One fix came after the measured run: one source fault's landing time was read from the deleted rows' first landing instead of the deletion time the protocol declares; its replays were identical and no reported measure moved. The wording of this page was written after the results.

The predictions and what happened
PredictionOutcome
No rule pages on the clean month (0 false pages per week).held: no rule paged on the clean month
Paging on every failed check pages every fault any check catches, about 20 of 30.partly: it paged every caught fault, 25 of 30, more than the 20 predicted
Paging only on critical models pages at most 6 of 30.held: 3 of 30
Routing by severity lets no more faults reach a viewer first than paging only on critical models.held: 13 against 24
Under paging on every failed check, the median fault sends at least 2 pages on the morning it is first seen.held: a median of 2
The totals row rule quarantines some rows of the clean month.wrong: the clean month lost no rows to any rule
Quarantine leaves less metric error than loading on the duplicate faults, and hides the late file (S03).held: all four duplicate faults came back right, and the late file was among the 11 it hid