-
Notifications
You must be signed in to change notification settings - Fork 976
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
Updates to Model Contracts (v1.5 betas) #3100
Conversation
✅ Deploy Preview for docs-getdbt-com ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
@matthewshaver I think this is ready for editorial review. There's one TODO that's really missing, which is proactively documenting some known limitations/caveats for constraints
(things we chose to kick out of scope / not prioritize).
|
||
### For maintainers of adapter plugins | ||
|
||
Coming soon: GH discussion detailing interface changes and offering a forum for Q&A | ||
For more detailed information and to ask any questions, please visit [dbt-core/discussions/6624](https://github.com/dbt-labs/dbt-core/discussions/6624). |
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.
Stealing from #3052 - no reason to delay getting this info live
@@ -53,9 +56,9 @@ More to come! | |||
::: | |||
|
|||
### Publishing models as APIs |
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.
Some of the nomenclature here is liable to change, as we go through formal internal naming process. No updates just yet / for this PR; I expect to be ready with those updates before the RC (April 13).
``` | ||
|
||
## Example | ||
## Support |
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.
This is a more-positive spin on "Limitations" :) but if you think that's a clearer way of expressing it, we can switch out one for the other (or for something else)
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.
It looks good. Always more pleasing to the reader to put a positive spin on anything. "Don't apologize for keeping them waiting; thank them for their patience" type of experience.
- `type`: one of `not_null`, `primary_key`, `foreign_key`, `check`, `custom` | ||
- `expression`: text input to qualify the constraint |
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.
- `type` (required): one of `not_null`, `primary_key`, `foreign_key`, `check`, `custom`
- `expression`: text input to qualify the constraint; required for certain constraint types, and optional for others
- `name` (optional): some data platforms support defining constraints with a human-friendly name
To that end, there are two optional fields you can specify on any constraint: | ||
- `warn_unenforced: False` to skip warning on constraints that are supported, but not enforced, by this data platform. The constraint will be included in templated DDL. | ||
- `warn_unsupportedL: False` to skip warning on constraints that aren't supported by this data platform, and therefore won't be included in templated DDL. | ||
|
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.
TODO: document the limitations called out in #2945 (comment)
- no
ref
support forforeign_key
/references
constraints- no standard support (yet) for platform-specific
rely
instructions, unless implemented for that platform specifically- no support for schema evolution in
incremental
models - adding/removing constraints as the column spec changes, during incremental runs
Co-authored-by: Jeremy Cohen <jeremy@dbtlabs.com>
Co-authored-by: Jeremy Cohen <jeremy@dbtlabs.com>
Co-authored-by: Jeremy Cohen <jeremy@dbtlabs.com>
resolves #2945
resolves #3023
What are you changing in this pull request and why?
Updates to docs on Model Contracts based on changes in:
Plus, some updates to the v1.5 upgrade guide. We should give this a full once-over before the RC on April 13, including links out to other related documentation changes.
cc @MichelleArk @matthewshaver I'm going to take another pass (later) in the morning :)