GitLab publishes its data quality approach in its open handbook: a Trusted Data Framework of SQL and YAML test cases with PASS or FAIL results, four test types, and tiered data assets. What problem does that shape solve that a schema registry does not, and what does it cost?
Show the full answer Hide the answer
The situation
A schema registry stops a producer changing a field's type. It says nothing about whether the numbers are right. Most analytical breakage is semantic, not structural: a column keeps its type and starts carrying nulls, a row count halves after an upstream filter changes, a currency silently switches. The schema still validates.
GitLab's handbook describes the framework it built for this: test cases expressed in SQL with YAML metadata, returning PASS or FAIL, in four types — schema tests, column value tests, row count tests and golden data tests — with data assets classified in tiers so that the most important ones carry the most scrutiny.
Why that shape works
- SQL as the test language means the people who understand the data can write the tests, which is the constraint that kills most quality programmes. A framework only a platform team can extend gets the coverage a platform team has time for.
- PASS or FAIL, not a score. A binary result can gate a pipeline. A quality score of 87 cannot, because nobody knows what to do at 86.
- Golden data tests — a known input with a known correct output — catch logic regressions that no statistical check finds, because the expected answer is written down rather than inferred from yesterday.
- Tiering admits the thing most programmes will not say out loud: you cannot test 4,000 tables equally, so declare which ones matter and where breaking the build is justified.
What it costs
Tests are code with a maintenance bill. A test that fails for a legitimate business change is a false alarm, and a suite with more than a few percent false alarms gets muted within a quarter. Golden datasets need refreshing as the business changes. Tiering requires an owner willing to say a dataset is not important, which is a political act.
When this is the wrong shape to copy
A four-person startup with 30 tables should write assertions in its transformation framework and stop. This shape earns its keep when many teams publish to a shared estate and no single person can review a change's blast radius. Below that, the tiering ceremony costs more than the failures it prevents.
The transferable part is not the framework. It is the pairing: a binary result that can gate a merge, written in the language the domain experts already use, applied unevenly on purpose.