Add a contract block with enforced: true to the model's YAML configuration file
Define every output column with its name, data_type, and optional constraints such as not_null or unique
Run dbt compile to verify that the contract schema is syntactically valid before execution
Run dbt run and observe that dbt generates the model as a versioned contract; if column types or names diverge from the schema, the run fails with a contract violation
Add the contract to CI so that schema regressions are caught on pull requests before they reach production
Known gotchas
Contracts are only enforced on materialized objects (tables and incremental models); views do not support contracts because dbt cannot introspect view column types at compile time on all adapters
The data_type in the contract must match the exact type string the adapter uses; type aliases (e.g., int vs integer on some warehouses) may cause false contract failures
Once a contract is set with enforced: true, any rename or type change of a contract column is a breaking change; use model versioning (version: 2, defined_in) to manage breaking changes without breaking existing consumers
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp