PRACTITIONERCHAPTER 10

Data quality and trust

A number is only as good as the decision it feeds: how to find out what is wrong with a figure, size the doubt, choose between publishing, caveating and holding, and write the review that stops it happening again

40 MINDATA AND MLUPDATED 2026-11-21
PREDICT

Kenya's delivery rate is 91.2%, computed from the delivery reports that arrived. 8% of that carrier's reports are missing, and you do not yet know why. What is the most accurate thing to say about the true rate?

Every data job ends with someone acting on a number. Quality is not a property of the table. It is whether the number is good enough for that action. This chapter is about the point at which you doubt a figure that is due to be used, which is a different skill from building a pipeline. You have to find out what is wrong, say how much it matters, choose what to do about the deadline, and make the next failure cheaper. The cause usually sits upstream with someone else, and your job does not end at pointing at them.

Fitted to a decision, not clean in the abstract

Textbook lists give data quality several dimensions, and the following are the ones that matter in practice. Each fails in a different way and each wants a different check.

Dimension What it asks A Wrenpost example A first check
Completeness Is everything that should be here, here? A carrier’s delivery reports are 8% short Count records received against records expected, by source and day
Uniqueness Is each event here once? A carrier retries a webhook and the report is stored twice Count rows per message id and status
Timeliness Is it here yet? Reports for yesterday’s messages are still arriving Plot arrival delay; compare mature and immature days
Validity Does it have an allowed form? A status value the mapping table has never seen Test against a list of accepted values
Consistency Do two places agree? The dashboard and the carrier’s monthly file give different rates Reconcile counts between systems
Accuracy Does it match the real world? A message marked delivered that never reached a handset Sample a few records and trace them by hand

The last row is the hardest and the one machines check least. You usually find accuracy problems by comparing with something independent, not by inspecting the table that holds the error.

Because quality is fitness for a use, the same table can be fine for one question and wrong for another. A delivery-rate figure that is 3 points off does not matter for deciding whether to add a server. It matters a great deal when it sits against a 90% target in a board pack, or in a contract review with the carrier. That is why the first question about a suspect number is the one from asking the right question: what decision does it feed, and which results would change it?

Five ways a number goes wrong

Most data quality incidents are one of five things. It helps to name which one you are looking at, because the checks and the owners differ.

Failure What it looks like Typical cause The check that catches it
Missing A rate looks fine but the denominator is short A webhook endpoint times out; a carrier drops reports; a job fails halfway Volume against expected, per source and day
Duplicated A rate rises, or one customer sees more than 100% Retries without a unique key; a job run twice Unique test on the event key
Late The latest days always look worse, then recover Reports arrive hours or days after the send Compare only matured periods; track arrival delay
Changed meaning A step change on one date with no product change A source adds a status, a field changes units, a mapping default is wrong Distribution check; accepted-values test
Multiplied Totals are too high after a new join A one-to-many join counted at the wrong grain Row count before and after each join; a reconciliation to source

The pattern behind four of the five is that the number is still computed and still looks plausible. The pipeline did not fail; the data in it did. The authors of Data Quality Fundamentals describe this as the “good pipelines, bad data” problem. Monitoring the job that runs is not the same as monitoring the data it produces.

Lateness deserves a note, because it is the failure analysts create for themselves. If delivery reports take up to 72 hours to arrive (an illustrative figure; measure your own), yesterday’s rate is always lower than last week’s, and a dashboard that shows both will report a decline that never happened. Say which days are mature, or show the rate only for messages old enough to have reported.

Missing data is rarely random

Statisticians distinguish three kinds of missingness, a classification usually credited to Donald Rubin in 1976. Data are missing completely at random when the chance of a record being missing does not depend on anything. They are missing at random when it depends only on things you observed, such as the carrier or the day. They are missing not at random when it depends on the missing value itself.

You do not need the algebra, but you do need the habit of asking which one you have. Delivery reports are a good example. A carrier may fail to send a report when the handset is switched off, when the message expired, or when the route was congested, and each of those is related to whether the message was delivered. If so, the reports that are missing skew towards failures, and the reports you hold overstate the rate. If the gap came instead from a webhook endpoint that was down for six hours, the loss may be close to random across messages, and the reports you hold are a fair sample. The count is the same in both cases. The meaning is not. You cannot settle which case you are in from the table; you need the cause, or an independent source.

Size the doubt before you argue about it

You rarely know the true value, but you can almost always bound it, and the bound is more useful than a debate. Take Kenya. Suppose 1,250,000 messages were sent, reports arrived for 1,150,000 of them (92%), and 1,048,800 of those reports say delivered, which is 91.2% of 1,150,000.

  • Floor. Every message with no report failed: 1,048,800 of 1,250,000, which is 83.9%.
  • Ceiling. Every one succeeded: (1,048,800 plus 100,000) of 1,250,000, which is 91.9%.

The true rate lies in an eight-point band, and the figure you were about to publish sits near the top of it. Whether that matters depends on what the audience does with it. If the board’s line is 90%, the band straddles it, and the number cannot answer the question it is being asked. If the missing share had been 1%, the floor would be 90.3%, the whole band would sit above the line, and a short caveat would be fine. The same missing share does different damage at different margins. That comparison, range against decision line, is the single most useful test in this chapter.

A bound is a starting point. You can then try to narrow it:

  • Recover the records. Ask the producer whether it can replay or resend. Carriers and payment providers often can, for a limited window.
  • Find a second source. The carrier’s own delivery file, or an invoice that counts delivered messages, gives you an independent count to reconcile against, as in reconciliation.
  • Sample the gap. Trace a random 200 of the missing messages by hand through whatever independent record exists, and count how many were delivered. With 200, the standard error on that sub-rate is at most about 3.5 points. The missing messages are 8% of the total, so the overall rate is pinned to roughly plus or minus 0.55 points at 95% confidence. That turns an eight-point band into one a board can read. It only works if the sample is random and the independent record is trustworthy; say so in the write-up.

A triage routine for the first hour

When a number looks wrong, or you find out it might be, work through the same steps in the same order.

  1. Reproduce it. Run the query again, on a fresh day, with a second analyst’s query if you can. Rule out your own mistake first; most suspect numbers start there.
  2. Scope it. Which sources, countries, dates and metrics are touched? A gap in one carrier’s reports touches every figure that uses that carrier, including ones built on top.
  3. Size it. Compute the bounds. Do they cross a line anyone acts on?
  4. Trace it. Follow the data hop by hop, counting at each: carrier, webhook endpoint, queue, parser, table, model, dashboard. The hop where the count falls is where to look. This is the same discipline as reconciling two ledgers, and for a fuller treatment see reconciliation.
  5. Name the owner. Someone owns each hop. Find out who, and tell them with the evidence, not the accusation. For Kenya, that is the Delivery Reports team, where Yara works.
  6. Tell the people who are about to use it. Before you fix anything, tell whoever is about to publish or decide. They would rather hear it from you on Thursday than from someone else on Wednesday.

Catch it earlier: tests, freshness and contracts

The cheapest quality fix is a check that fails before anyone sees the number. Four kinds cover most of the ground.

  • Volume and freshness. Did enough records arrive, and recently? Compare today with the same weekday in earlier weeks, not with yesterday.
  • Schema and values. Do the columns and categories look as they did? Tools such as dbt ship generic tests, and the four built-in ones are unique, not_null, accepted_values and relationships, which between them cover duplicates, gaps, unseen statuses and orphan rows.
  • Distribution. Has the shape moved? A delivered rate that jumps 3 points on one date with no change in the product is a symptom, whatever the cause.
  • Reconciliation to source. Does what you hold agree with what the source says it sent? This one catches the failures the others cannot, because it compares against something outside your own pipeline.

Two warnings. First, a check is only worth having if someone acts on it, so keep alerts few and attach each to an owner; see alert design for why a noisy alert is ignored. Second, put checks where the failure starts, not only at the dashboard. By the time a figure reaches a chart, the cause is several steps away. The pipeline technique itself belongs to pipelines and data modelling; here the job is to know which checks you need and to ask for them.

Publish, caveat, hold or leave out

When the deadline is fixed and the number is in doubt, you have four moves, and each is right in some circumstances.

Move Right when Wrong when
Publish with a caveat The whole range of doubt sits on one side of every line the audience will act on The range crosses a decision line, or the caveat will be cut when the slide is copied
Publish the previous figure The audience needs a trend and the old figure is clearly labelled as old It is shown as current, which is a new error, not a safe default
Leave it out The metric is minor to this meeting and nothing on the agenda depends on it It is the thing the meeting is about, because its absence is a statement too
Hold the pack The range crosses a decision line and a fix or a narrower bound can land before the meeting The fix has no date, or the deadline is the meeting itself

The questions that sort them are short. Does the range cross a line anyone acts on? Can you narrow it before the use? What does the audience lose if they wait? When the range is clear of every line, publish with a caveat and move on. When it crosses a line and you have a dated route to a better number, holding is cheap. When it crosses and you have no route, say what you know, give the range, and name the date you expect to know more.

Whatever you choose, you tell the person who owns the pack, in writing, before they find it themselves. Their authority covers the deadline; yours covers what the data can support.

What to say, and how

The words you use change how a doubt lands. “The data is wrong” is rarely true and always alarming. A better pattern has five parts: what you know, what you do not, how big the doubt is, what you are doing about it, and when you will know. For example: “Kenya’s delivery rate reads 91.2% on the reports we hold, but 8% of that carrier’s reports are missing. The true figure is between 83.9% and 91.9%, and our target is 90%. The carrier can resend within two working days. I will have a number by Tuesday noon.” Nothing in it blames anyone. It gives the reader what they need to decide.

Trust in data behaves like trust in a person who forecasts: it builds slowly and is lost by a retraction more than by a delay. A team that sometimes says “not yet” is believed when it says “yes”. A team that publishes a number and later restates it teaches readers to discount every number. Treat that as an observation from experience, not a law, and notice what your own readers do after a correction.

The incident review

After any incident that put a wrong number in front of someone, write a review within a week, while people still remember. The Google SRE book argues for blameless postmortems, which look at contributing causes without blaming any person or team, and the case is as strong for data as for services: people who are blamed stop reporting the near-misses. For the mechanics of running one, see incidents and postmortems. A data quality review has seven parts:

  1. Summary. Two sentences: what was wrong and for how long.
  2. Impact. Which numbers were affected, who saw them, what was decided with them.
  3. Timeline. When it started, when it was found, when it was fixed, when it was corrected.
  4. Cause. The hop where the data went wrong, and why.
  5. Detection. How it was found, and how it should have been found.
  6. Decisions. What was published or held, by whom, and the reasoning.
  7. Changes. Each check or agreement you will add, with an owner and a date.

The sections that most reviews skimp are detection and decisions. If a customer or a board member found the problem before you did, say so; it points at the check you lack.

Where practitioners disagree

Caveat or hold. Some teams hold the number on principle, because a caveat is the first thing deleted when a slide is copied into another deck. Others publish with caveats on principle, because holding trains the business to wait on data. Both have a point. The deciding fact is whether the range crosses a line, not which policy you hold.

Who owns quality. One model puts a data quality function in the data team, which finds problems after the fact. The other makes the teams that produce the data accountable for it, which fixes problems at the source and needs those teams to care. Most companies drift to the first and should aim for the second, with a data team that measures quality and escalates.

Block or warn. A failing check can stop the pipeline or can raise a flag and let the data through. Blocking is safer and slows everything; warning is faster and gets ignored. A common compromise is to block for the handful of tables that feed money, contracts and the board, and to warn for the rest.

Where it goes wrong

Trusting green. A passing job tells you the code ran. It tells you nothing about the data.

Fixing the symptom. Filling a gap with last month’s average hides the cause and makes the next incident harder to see.

Silent corrections. Changing a published figure without saying so is worse than the original error.

Blame. If the review reads as a case against the Delivery Reports team, the next gap will be found by a customer.

Day to day

Daily, you glance at a freshness and volume view for the sources your numbers depend on, five minutes at the start of the day. Anything that looks off gets the triage steps. You answer alerts that name you and mute none without telling their owner.

Weekly, you hold a thirty-minute quality review with the upstream owners, such as the Delivery Reports team: open issues, new checks, what broke and what nearly did. You keep a short list of known gaps, each with a state.

Before every board or customer pack, you freeze the numbers three working days ahead where you can, so a doubt has room to be resolved. You run the sign-off list: bounds computed for any suspect figure, caveats written, owners told. That list is a habit, not a form.

After an incident, you write the review within five working days and send it to everyone who saw the wrong number.

Monthly, you pick the failure type that cost the most that month and add one check against it. Three or four a quarter is a realistic pace, and a rule of thumb, not a target.

BY ORG SIZE
STARTUPunder 30 people

There is one pipeline and perhaps one person who knows it. Quality is that person’s memory and a few queries run by hand before anything is shared. A written list of the checks, even five lines, is the biggest single gain, because it survives a holiday and lets a second person take over. The risk is that the only check is the founder’s sense that a figure looks off, which fails on the day they are not in the room. Keep the sign-off before anything leaves the building.

SCALE-UP30 to 300

Several teams now produce data and several consume it, and nobody is sure who owns a given table. Automated checks pay for themselves, along with a named owner per source and a short agreement with each upstream team. The data team becomes the place where problems are found, which makes it the place they are blamed. Hold the line that the producer fixes, the data team measures, and both appear in the review.

ENTERPRISE300 and up

Quality is a function with tooling, a data catalogue, service levels and an escalation path, and the work is as much about decision rights as detection. Producing teams can be in different countries and reporting lines, so a gap can sit in a queue for weeks. The skill is to attach a figure’s quality state to the figure itself, so that a board reader can see how far to trust it, and to keep reviews moving when no single person owns the fix.

ARTEFACT Write a data quality incident review ~45 MIN
YOU PRODUCEA data quality incident review

Template

# Data quality review: <short title>
Written by · Date · Reviewed with (owners of each hop)

## Summary
<Two sentences: what was wrong, for how long, how big.>

## Impact
| Figure | Published value | Corrected value | Who saw it | What was decided with it |
|---|---|---|---|---|

## Timeline
| Date and time | Event |
|---|---|
| | Problem began |
| | Problem detected, and by whom or what |
| | Fixed at source |
| | Figures corrected and readers told |

## Cause
<The hop where it went wrong, and why. Describe systems and conditions, not people.>

## Detection
<How it was found. Which check would have found it earlier. Why it did not exist.>

## Decisions made
<What was published, held or corrected after discovery, by whom, and why.>

## Changes
| Change | Owner | Date |
|---|---|---|

## Open questions
<What is not yet known.>
WORKED EXAMPLE

Wrenpost, March: the South Africa delivered rate. Tiwatope wrote this review after the figure was corrected.

Summary. South Africa’s delivered rate read 97.6% for March when the true rate was 94.3%, because a new carrier status was counted as delivered. It was wrong for 29 days.

Impact. Of 2,000,000 messages, 1,952,000 were reported delivered (97.6%). Corrected, 1,886,000 were delivered (94.3%), so 66,000 messages were counted wrongly. The 97.6% appeared in the board pack of 5 April and on the customer dashboard; one enterprise customer used it in a quarterly review. February had read 94.1%.

Timeline. 11 March: the carrier begins sending a status for handsets that are unreachable and being retried; the mapping table’s default branch treats any unseen status as delivered. 9 April: Tiwatope, reconciling the carrier’s monthly file against Wrenpost’s table, finds a 3.3-point gap. 10 April: Yara, on the Delivery Reports team, changes the default to unknown and replays March. 11 April: customers and the board are told, with the corrected figure.

Cause. A catch-all in the status mapping, with no alert on new values.

Detection. Found by monthly reconciliation, 29 days late. An accepted-values test on the status column would have failed on 11 March.

Decisions. The board pack was restated in the April pack with a note, and the dashboard carried a banner for a week.

Changes. Accepted-values test on every carrier’s status (Yara, 24 April). Weekly reconciliation in place of monthly (Tiwatope, 1 May).

Now you

It is 10 November. For the five working days from 3 November, Ghana’s delivery rate read 98.4% on the customer dashboard against 95.1% the week before, and a weekly email carried it to about 40 enterprise customers. This morning one customer’s dashboard shows 101.3%, and you are Tiwatope. You find that on 3 November Wrenpost’s webhook endpoint for the Ghanaian carrier began timing out for six hours; the carrier retries any report that goes unacknowledged, and Wrenpost’s table has no unique key on the report. Figures for the week: 310,000 messages sent, 305,000 delivered rows of which 10,500 are duplicates. Yara, on the Delivery Reports team, can add a key and remove the duplicates by Wednesday. Write the review. It must show the corrected rate, say what the customers saw and how long, and say which check would have caught this on 3 November.

Self-check

DECIDE

Thursday 16:00. October's board pack is due to Wrenpost's chief financial officer on Friday at noon, and the board meets next Wednesday to discuss, among other things, whether to renew the contract with the carrier that carries Kenyan traffic today, while the direct connection planned for 1 March 2027 is still being built. Kenya's delivery rate reads 91.2% against a board target of 90%, but 8% of that carrier's reports are missing, so the true rate lies between 83.9% and 91.9%. Last month's figure was 90.6%. You are Tiwatope. Yara says the carrier can replay the missing reports within two working days, and the cause is not yet known. What do you do?

READING
  1. BOOK
    Data Quality Fundamentals Barr Moses, Lior Gavish and Molly Vorwerck, 2022

    Frames quality as something you monitor in the data and not only in the jobs, and covers service levels for data. The authors work for a data observability vendor, so read the tooling advice with that in mind. Read: The opening chapters on the good pipelines, bad data problem and on building a quality practice.

  2. BOOK
    Concepts of MCAR, MAR and MNAR Stef van Buuren

    A readable account of the three kinds of missingness and why the answer depends on how the gaps arose. Read it before you assume a gap is random. Read: Flexible Imputation of Missing Data, section 1.2, free online.

  3. DOC
    Data tests

    The dbt documentation on declaring tests such as unique, not_null, accepted_values and relationships. Useful as a concrete list of the cheap checks a pipeline should have.

  4. HANDBOOK
    Postmortem Culture: Learning from Failure Google

    The case for blameless reviews, from a team that runs them daily. Written for services, and it carries over to data incidents without change. Read: Chapter 15 of the Site Reliability Engineering book.

  5. POST
    PHE statement on delayed reporting of COVID-19 cases Public Health England, 2020

    The official account of 15,841 cases missing from daily totals. A reminder that a complete-looking dashboard can hide a large gap, and that the harm lands on decisions made with the figures.

All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.

RECALL CARDS Tap to flip. They join your review deck when you mark the lesson complete.
NEXT: Dashboards and self-serve BI →