jargon

Comparison

Data expectationvsData test

Data expectation

you write down that this column should be between zero and one hundred and that ninety-nine percent of rows should have an email, and it is checked automatically.

A declarative statement of what data should look like, expressed as a rule and evaluated against a dataset. Writing expectations is where most of the value is, because the act of stating them surfaces assumptions nobody had said out loud. The recurring practical problem is thresholds: an expectation with no tolerance fails on the first legitimate outlier and is then disabled forever.

Full entry →

Data test

the transform ships with a check that this column is never null, and the check runs against real output every night rather than against a fixture.

An assertion evaluated against actual data in the warehouse, rather than against code. It is a fundamentally different thing from a unit test: the code did not change, the input did, so it must run on every load rather than in CI. That also means it can fail at 03:00 for reasons nobody controls, which is why every data test needs a decision attached about whether failing it stops the pipeline.

Full entry →

Related comparisons