Skip to content
aiqbenchAI & Quantum Intelligence
NewsInsightsBenchmarksSkillsAsk AILearnAbout
...Loading your session
NewsInsightsBenchmarksSkillsAsk AILearnAbout
  1. Future Jobs
  2. ›
  3. Data & Intelligence Engineer
  4. ›
  5. Lesson 4 of 8

Data Quality, Testing & Contracts

Intermediate¶ Read · 3 min⚑ Mission · 25 min◆ Test · 5 questions✓ Checked Nov 30, 2026

You'll be able to:

You can define a data-quality strategy that catches silent breakage before it reaches a dashboard, and explain why an upstream schema change is often more damaging than a bug in analytics code.

A revenue dashboard was wrong for six weeks. It was not wildly wrong — it was about eleven percent low, which is well inside the range where a number still looks plausible. Nobody noticed until a finance reconciliation forced the comparison. The pipeline had succeeded every single night. This is the central difficulty of data quality: the absence of errors tells you nothing.

The categories of test worth writing

A practical data-quality suite covers five kinds of check. Uniqueness and not-null on primary keys catch structural corruption. Freshness asserts that data arrived at all, and recently. Referential integrity catches orphaned foreign keys — orders pointing at customers that do not exist. Distribution checks catch values that are structurally valid but statistically implausible. Business invariants encode domain truths: refunds never exceed the original charge, a subscription cannot end before it begins.

Here is what experienced practitioners know and newcomers consistently get backwards: the single highest-value test is almost always freshness, and it is the cheapest one to write. The overwhelming majority of real incidents are not "the number is subtly wrong" but "the data stopped arriving and the chart kept showing the last good value." Teams routinely build elaborate correctness assertions while having no alarm for a pipeline that simply stopped.

Why upstream schema changes hurt more than analytics bugs

An analytics bug lives in code you own. It is version-controlled, reviewed, tested, and you can roll it back in minutes. An upstream schema change arrives unannounced, from a team with no visibility into your dependency, and every downstream consumer inherits it simultaneously and silently.

This asymmetry is what data contracts address. A contract is an explicit agreement at the producer boundary covering schema, semantics, and freshness guarantees — enforced in the producer's CI, so a breaking change fails their build rather than your dashboard. It moves detection from hours-after-damage to before-merge.

Failure modes

Alert fatigue — two hundred tests, thirty failing on any given day, most of them known and unactioned. Signal: a dedicated alerts channel that everyone has muted, and incidents that are discovered by executives rather than by monitoring.

Freshness blind spot — the pipeline fails silently or an upstream export stops, and the dashboard confidently displays stale numbers. Signal: a chart that flatlines at exactly the last good value, holding a perfectly constant line for days.

Testing only the final mart — every assertion runs at the end of the pipeline, so you learn that something broke but nothing about where. Signal: incident triage that consistently takes hours and begins with bisecting the DAG by hand.

Seasonality-blind distribution tests — a static threshold on daily volume fires every weekend because weekend traffic is legitimately half of weekday traffic. Signal: an alert that recurs on a predictable calendar rhythm and is routinely dismissed.

Explaining this to stakeholders

On tests versus contracts: tests are smoke detectors, and they are essential — but a contract is the building code that stops the house being wired badly in the first place. One tells you there is a fire; the other reduces how often fires start.

On why a passing pipeline proves nothing: the pipeline reports that it ran, not that it was right. A delivery van completing its route does not mean the packages were in it.

On the value of freshness alerts: the most common failure is not a wrong answer, it is yesterday's answer presented as today's. That is also the easiest failure to catch, which is why it should be the first alarm anyone builds.

Curated Materials

1h

The deep work happens here — the lesson is your briefing.

  • Great Expectations: Core ConceptsDocs· 25 min
  • Data Contracts (Chad Sanderson)Tutorial· 20 min
  • dbt: Tests OverviewDocs· 15 min

Live on aiqbench

This lesson's subject on the rest of the site, today.

In the news, last 30 days

  • RoboIntervene: A Dataset for Learning When to Step In and How to Recover Robot Policy ExecutionarXiv · Dec 4
  • HuGEM: A Humanoid Manipulation Dataset with Paired Goal- and Execution-Level InstructionsarXiv · Dec 4
  • Human-Agent Forensics and Recovery of an Extreme-Scale Climate DatasetarXiv · Dec 4
More news on this subject →

Go further

  • Benchmark report cardsWhat each benchmark measures and where it falls short.
  • Ask AI about this lessonOpens Ask AI with a question about this lesson, answered from the news archive with sources.
  • Agent skills for this workReady-made skills for AI coding agents, checked and rated.

Test your knowledge

5 questions in 100 seconds, on a page of its own. Read everything above first.

Test your knowledge →

Module Mission

20–30 min

For a daily revenue metric, list 5 tests you would run: uniqueness, freshness, referential integrity, distribution, and one business-logic invariant. For each, describe what triggers the alert and who gets paged.

Loading your work…

← Previous lesson3. Data Modelling & TransformationNext lesson →5. Orchestration & Pipeline Reliability
aiqbench
AI & Quantum Intelligence© aiqbench. All rights reserved.

Feeds:RSS·JSON Feed

LanguageEnglish·Românăbeta
NewsAI & TechQuantumInsights
ExploreBenchmarksLearn
CompanyAboutTrustLegal noticeTerms of ServicePrivacy PolicyCopyright noticesData erasureReport content

The aiqbench take, the insights, the daily digest and Ask answers are written by AI models from the sources shown, without editorial review before publication. They may contain errors — check the source. How the model is used →

  • News
  • Insights
  • Ask AI
  • Benchmarks
  • Account