-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Reported in #7065 (comment)
Reproduction case
-- models/sometable.sql
select 1 as idmodels:
- name: sometable
config:
contract:
enforced: true
columns:
- name: order_id
data_type: number
- name: order_name
data_type: varcharRun:
$ mkdir state
$ dbt ls
$ mv target/manifest.json state/
Change the yaml to:
models:
- name: sometable
config:
contract:
enforced: true
columns:
- name: order_id
data_type: number
- name: order_name
data_type: varchar
- name: categories
data_type: varchar$ dbt ls -s state:modified --state state/
10:38:49 Running with dbt=1.5.0-b5
10:38:50 Found 2 models, 0 tests, 0 snapshots, 1 analysis, 536 macros, 0 operations, 1 seed file, 0 sources, 0 exposures, 0 metrics, 0 groups
10:38:50 Encountered an error:
Contract Error in model sometable (models/sometable.sql)
There is a breaking change in the model contract because column definitions have changed; you may need to create a new version. See: https://docs.getdbt.com/docs/collaborate/publish/model-versions
Also
Let's rename ModelContractError to ModelContractBreakingChangeError, to better disambiguate it from ContractError (when the model's contract fails at build time).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working