-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CT-2038] Detect breaking changes to column names and data types in state:modified check #6869
Comments
Do we want this exception to be limited to commands where the user has explicitly selected We could also add a new sub-selector, Implementation detail: We have a number of
|
error message should direct users to create a new version and point to versioning docs: https://docs.getdbt.com/docs/collaborate/publish/model-versions |
What about order? If the order of the columns changes should it be considered modified or not? |
If contracts are set to false in both old and new states, then I assume that even if the the columns names or data_types change, that is not a breaking change? |
For now, we're going to say that column order doesn't matter. We might add this as a configuration option later on if lots of users request it.
Correct! Adopting the terminology / data structure proposed in #7184:
|
Currently when old has contract false and new has contract true, it will show as modified because the config has changed: unrendered_config = {'contract': True, 'materialized': 'table'} |
Yes! It's definitely a change, and the model should be selected to run by |
@MichelleArk I've removed including "constraints" in the checksum, since it looks like that's not part of this ticket. Let me know if you want something different. |
If a model with
contract:true
has its column name/data types modified in a way that represents a breaking change, dbt should raise an error as part of thestate:modified
check.What constitutes a breaking change?
contract:true
tocontract:false
The text was updated successfully, but these errors were encountered: