What is a data contract?
mediumAnswer
- Formal agreement between data producer + consumer specifying: (1) schema (columns + types + nullability).
- (2) semantic meaning of each field.
- (3) update frequency + freshness SLA.
- (4) quality guarantees (uniqueness, range, referential integrity).
- (5) breaking-change process.
- Enforced via automated checks in CI on the producer side.
- Prevents 'silent schema drift'.
- Modern data engineering practice popularized by Andrew Jones.
- Tools: Data Contracts CLI, Iceberg schema evolution rules.
Check yourself — multiple choice
- Random
- Formal producer-consumer agreement on schema + semantics + freshness + quality + breaking-change process; enforced via CI on producer; prevents silent drift
- Legal doc
- Not real
Data contract: producer-consumer agreement + CI-enforced; prevents drift.
#data-quality#pipeline
Practise MLOps & Data Quality
215 interview questions in this topic.
Related questions
- What are common sources of data leakage in an ML pipeline?
- How does imputation cause data leakage?
- How does time-based leakage happen and how do you prevent it?
- How do you prove there is no training-serving skew?
- What is point-in-time correctness, and how does violating it look in practice?
- What is data drift and how do you detect it?