-
Notifications
You must be signed in to change notification settings - Fork 40
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
Model contract configs #59
Conversation
This reverts commit 49a64d4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looking hot! A few places where I think there's some changes since the first draft
schemas/dbt_project.json
Outdated
"+contract": { | ||
"$ref": "#/$defs/boolean_or_jinja_string" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contract
is an object now, containing a single bool enforced
(dbt-labs/dbt-core#7184, dbt-labs/dbt-core#7222)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, this should be deleted. Per the tests in that second PR the contract object is nested in config
and i added it to the model_config
block down below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh this is in the project yml file! will update!
This PR adds the configs for the upcoming 1.5 dbt core concepts for model contracts
you can:
For projects:
_resource.yml
files.For models
access
- whether the model is public/private/protectedcontract
- whether the model is subject to a model contractgroup
- assign a model to a groupFor columns:
constraint
- add a database constraint to the modelconstraint_check
add a SQL check on the columnFor metrics:
groups
inconfig
-- sneaking in a config object, as metrics will be able to be grouped -- adding the other two metric configs while I was in there (can split this out if we'd prefer to sequence these more thoughtfully)