Computing Library › Data Systems
Data Systems

Expectation Suites

An expectation suite is a versioned, executable collection of assertions about a dataset that produces a readable pass or fail report each run.

Assertions as data documentation

An expectation is a single testable assertion about data: this column is never null, these values fall within a range, this key is unique. A suite groups the expectations for a dataset into one executable document. Because the suite is both a test and a description, it doubles as living documentation of what the data is supposed to look like.

Common expectation types

Kronos motion — data assimilation

Suites as versioned artifacts

A suite lives in version control alongside the pipeline. When the data legitimately changes, for instance a new valid category appears, the suite is updated through the same review process as code. This prevents two failure modes: silently loosening checks until they catch nothing, and leaving stale checks that fail on legitimate changes. The suite's history is a record of how the data's contract evolved.

From check to report

Running a suite against a batch produces a structured result: which expectations passed, which failed, and by how much. Rendered as a report, this gives both engineers and stewards a shared, readable view of data health per run. The report is also an audit artifact: it demonstrates that data was validated before use, which matters for governed or regulated pipelines.

Profiling to bootstrap

Writing every expectation by hand is tedious, so tools profile a sample of existing data to propose a starting suite: inferred types, observed ranges, null rates. A human then curates the proposal, tightening what should be strict and relaxing what was coincidental in the sample. Profiling accelerates adoption but does not replace judgment, since an inferred range only reflects the data seen, not the data intended. See data-quality validation and data contracts.