Define and enforce data contracts between producers and consumers to prevent breaking changes and guarantee schema stability. Use when formalizing producer-consumer agreements, implementing schema constraints, or protecting downstream dependencies from upstream changes. Triggers: 'data contract', 'schema contract', 'data SLA', 'producer consumer', 'enforce schema', 'breaking changes', 'contract testing'.
I'll help you define, implement, and enforce data contracts — formal agreements between data producers and consumers that prevent breaking changes and set clear quality expectations.
Read .claude/data-stack-context.md. Key inputs: dbt version (contracts require dbt 1.5+), warehouse type, team maturity.
node tools/clis/schema-introspect.js to get the current warehouse schema as the baseline for the contract.schema.yml files to identify already-documented columns before writing new contract definitions.contract.enforced: true.A data contract specifies:
The simplest form: enforce schema at the dbt level.
# models/marts/core/_core__models.yml