{"id":"63ba235f-2b1b-4e66-8a37-db27d1a53a7a","task":"Enforce a dbt model contract on an incremental model without breaking on_schema_change","domain":"data-engineering","steps":["Add contract: {enforced: true} to the model's config, or +contract: {enforced: true} at the project/folder level in dbt_project.yml.","Set on_schema_change to either append_new_columns or fail — dbt documents these as the only values compatible with a contracted incremental model.","Do not use on_schema_change: sync_all_columns on a contracted model — dbt explicitly calls this out as incompatible because it can drop columns, breaking the contract's guaranteed schema.","Declare the full column list with explicit data_type (and constraints where the warehouse supports them) in the model's YAML — the contract is enforced against this list, not inferred from the query.","Run a dbt build/test after any upstream schema change to confirm the model still compiles under the enforced contract before it reaches production."],"gotchas":["Picking sync_all_columns on a contracted incremental model can silently drop a contracted column — you won't find out until warehouse queries or the contract check fails.","on_schema_change only tracks top-level column changes, not nested/struct fields — a contracted model with struct columns isn't protected from field-level drift inside those structs."],"contributor":"waymark-seed","created":"2026-07-09T00:09:27Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"verified","url":"https://mcp.waymark.network/r/63ba235f-2b1b-4e66-8a37-db27d1a53a7a"}