What is a data contract?
A data contract is a versioned specification of what a dataset will contain and how it will behave, agreed between the people who produce it and those who depend on it. It names each field, its type, and its meaning, and states which fields are never null, which values are allowed, how often the data is refreshed, and how far behind the source it may lag. It also sets the rules for change: how much notice consumers get before a field is renamed or removed. Many teams store the contract as a machine-readable file, so a pipeline that violates it fails its tests before publishing.
Why a data contract matters
Most broken dashboards and models trace back to an upstream change nobody announced. A manufacturer’s ERP team renamed a work order status column during an upgrade, and the plant’s equipment effectiveness dashboard showed zero downtime for a week before anyone noticed. A data contract makes that column part of a commitment, with a test that would have failed the upgrade’s deployment. Contracts also give AI teams stable inputs: a model trained on a contracted table keeps its meaning, and the owning team knows which models to inform before a change.
What to watch for
- Keep the first contracts small, covering the fields consumers actually use, so producers accept them.
- Enforce the contract in the producer’s deployment process, since a document alone will not stop a breaking change.
- Pair each contract with data observability so violations that slip past tests are still caught in production.