Key takeaways
- A number that is a day old and clearly dated is safer than a number that is fresh and wrong.
- A refresh has four stages: fetch, rebuild, verify, publish. Nothing publishes unless every check passes.
- Three kinds of check earn their place: a second route that must agree, a sanity range, and a drift check on figures already published.
- When a check fails, keep the last good numbers on screen, show their real date, and tell the owner at once.
- Aisha's nightly refresh works this way in our own deployment.
On this page
The choice every data team makes
Sooner or later a refresh breaks. A source is slow, a table comes back half empty, a field changes meaning. The question is what the reader sees next.
You have two options. You can publish whatever came out, so the dashboard is always fresh. Or you can hold the new numbers back and keep showing yesterday's. The first feels more alive. The second is safer, because people act on dashboards. A wrong number in a planning meeting turns into a wrong decision.
So the rule is simple. Prefer stale but correct to fresh but wrong. The word "correct" does a lot of work, so the rest of this guide is about how to earn it.
Four stages, one gate
Split the refresh into four stages and put a gate before the last one.
- Fetch. Pull the raw data from each source.
- Rebuild. Turn it into the tables and reports people read.
- Verify. Run the checks.
- Publish. Replace what readers see, but only if every check passed.
Keep the old version in place until the new one passes. Publishing should be a swap, not an edit in place. That way a failure leaves the readers with something whole.
Three checks that earn their place
You do not need fifty checks. You need a few that catch the failures you have actually had. Add one each time a bad number slips through.
| Check | What it catches | Sample |
|---|---|---|
| Agreement | A bug in one of two routes to the same number | Monthly revenue from the report builder must match monthly revenue from the database |
| Sanity range | A fetch that returned too little or too much | Sample: yesterday's orders table has 9 rows on a day that normally has hundreds |
| Drift | A published figure that no longer matches live data | An article says "4 launches", the data now says 5 |
| Freshness | A source that stopped updating | The newest row is three days old |
The agreement check is the strongest and the most work. Build the headline numbers two independent ways and make them match. If two separate routes land on the same figure, a quiet bug in one of them is very unlikely. If they disagree, you have found the bug before a reader did.
What happens when a check fails
Decide this part in advance too.
- The last good version stays live. Readers still see a whole, working page.
- The page shows its real "data as of" date. Nobody is told the data is fresh when it is not.
- The owner hears about it straight away, in your team chat and by email, with the name of the failed check.
- Nobody has to remember to look. A gate that needs a person to notice it is just a habit.
A failed refresh should feel like a smoke alarm, not like a mystery.
Fresh is not the same as complete
A gate tells you the data is internally consistent. It does not tell you the data covers the question. A database can be built last night and still miss a product line, or count sales a different way from the billing system.
When someone asks "how many sales", say which definition you are counting. Check whether the live source for that product answers it better than the stored copy. For recent and urgent questions, the live source usually wins. For history and comparisons, the stored, checked copy usually wins. Say which one you used.
Start small
If you have no gate today, do not build all of this at once. Pick the one report people quote most. Add a freshness check and a sanity range, and make the page show its "data as of" date. That alone catches most embarrassing failures. Add the agreement check for that report next. Then move to the next report.
One place publishes
Give the refresh a single home. In our own deployment, the nightly run on one server fetches, rebuilds, verifies and publishes. Laptops can run the checks locally, but they do not publish. A rebuild from a laptop that holds only part of the cache can quietly lose history, and the gate cannot see what it was never shown.
How Aisha does it
Aisha's nightly pipeline runs fetch, rebuild, verify and publish, and it never publishes unless every check passes. The checks include tests against known answers, plausibility checks and drift checks on every published figure. When she answers a question from the data, she says how sure she is and gives the date the data is current to.
See data gate and nightly refresh for the short definitions.
Frequently asked questions
Is a stale number not a problem too?
It is, which is why it carries its date and why a failed refresh alerts the owner. Stale is acceptable when it is labelled and short-lived. Wrong is never acceptable, because nobody knows to doubt it.
How strict should the checks be?
Strict enough to catch a broken fetch, loose enough that normal swings pass. Start with a few. Tighten them when a real problem shows you where the gap is.
Do I need two routes for every number?
No. Do it for the handful of numbers that people quote in decisions. Everything else can rely on sanity and freshness checks.
For the habit of checking before showing, read the Builds the intel you ask for action.