Engineering, production, governance, cost, communication · insight-0260
Write a data contract for every upstream table a model depends on
- Evidence type
- practitioner heuristic
- Difficulty
- easy
- Roles
- ML engineer, Data analyst, Data scientist
- Industries
- cross-industry
Summary: situation, action, reason, boundary
Situation
A model breaks because an upstream team renamed a status code and nobody told the data science team.
Action
Agree a contract per source covering schema, meaning of key fields and codes, grain, freshness, allowed ranges and an owner; turn the checkable parts into automated validation that runs before training and scoring.
Reason
Explicit, tested expectations turn silent upstream changes into failed checks with a named owner.
Boundary
Any model consuming data owned by another team or vendor.
Symptom or risk
Implicit dependencies mean producers cannot know what they break, and consumers learn about changes from bad predictions.
Exceptions
Exploratory one-off analyses do not need formal contracts, but record the assumptions.
Trade-offs
Contracts take negotiation time and slow producers slightly.
Pitfalls
Contracts that validate types but not semantics, such as currency or units.
Lessons and concepts
Claims and their sources
Great Expectations expresses data-quality tests as declarative Expectations that can be run in pipelines.