← AI glossary

AI glossary · Advanced · Data engineering

Data contract

A data contract is an agreement, set down in documents and code, between the side that produces data and the side that uses it, stating 'this data will be provided in this format, with this meaning and at this quality'. Changes that break the agreement are caught in advance.

About this term
Level
Advanced · Specialist terms that need the inner workings
Added
2026-10-09
In plain words It is similar to the supply specification between a parts supplier and a carmaker. Just as an assembly line stops if the bolt spec is quietly changed, reports and models that use data break if the data format changes without notice.

How it works

A data contract usually records the structure (schema), such as column names and data types; the meaning of each value; quality standards such as whether empty values are allowed and value ranges; the update frequency; and the owner. This content is often managed both as a human-readable document and as a configuration file that machines can check. When the team producing the data changes its code, automated checks verify whether the contract is violated, and breaking changes are blocked or flagged before deployment. If a major change is needed, a new version is created and the move happens after agreement with the consuming side.

What goes into a data contract

Format and meaning

  • Column names and data types (schema)
  • Meaning of each value

Quality

  • Whether empty values are allowed
  • Value ranges

Operations

  • Update frequency
  • Owner
  • Versioning and approval process for changes
A checklist grouping the items commonly written into a contract.

Why it matters

Many data problems arise when developers of the source system change column names or formats without knowing that someone downstream uses them. Data contracts shift these incidents from after-the-fact cleanup to prevention. In setups like a data mesh, where several teams each take responsibility for parts of the data, they become a key mechanism for making agreements between teams clear. They also help prevent AI model training data from changing quietly and degrading performance.

Things to know

A contract only works if the producing side accepts responsibility for honoring it, so reaching agreement within the organization is harder than the technology. Starting with important data is more realistic than applying contracts to all data from the outset. Format checks alone cannot catch every problem where 'the value is valid but the meaning is wrong', so contracts are used together with monitoring tools such as data observability. Rather than one fixed standard format, the way contracts are written varies somewhat by company and tool.

Example

When the development team running an order system pushes code that changes the data type of the 'order amount' column, an automated check in the deployment pipeline finds the contract showing that this column is used by a revenue dashboard and a demand forecasting model, and blocks the change. The development team works with the consuming teams to create a new version of the contract and then migrates step by step.

Related terms