-
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
[Feature] Make warn_unenforced
and warn_unsupported
constraint options on the project level
#10159
Comments
Thanks for reaching out about this @jsnb-devoted ! Wanna take a look at the |
Hey @jsnb-devoted ! @dbeatty10 You beat me to it :) I just confirmed that this worked for me locally:
This can also be set:
|
That looks like what I need. I'll add it to the list of things to check out when we make it to 1.8. Thanks yall. |
Sure thing @jsnb-devoted ! I'm going to close this as resolved, but please reach out if run into any issues or have any follow-up feedback. |
@dbeatty10 Happy Thursday! I've tried this in our project and I can't get it to work. A few things...
I definitely have models that include a Did something change with this?
But it doesn't seem to change anything. The not supported warning above still appears. The not enforced one does not (though, again, it doesn't appear regardless of whether or not I have this in the project.yml). I also want to note that it's a little tricky to test these in the IDE because they don't show up as warnings when you run or build a model but rather during parsing (which is hidden unless you click the little "ready" pill). But then they show up when you run a job. On a related note, the warning itself could be more informative. 😬 When you're staring at something like this screenshot, and your project has 2,000 models, it's a little hard to know which ones need to be updated. 😃 I mean, if we can turn the warning off entirely, that'd be even better. But if we are going to get the warning, would be nice to know which model is generating the warning. Thank you!! Appreciate your help! |
Following up in case anyone else comes across this. Looks like we needed to add: Also, while I found that removing |
Is this your first time submitting a feature request?
Describe the feature
I would love to be able to suppress the warning:
for dbt run/build. Our users are aware that the constraint is unenforced so the logs are taking up space.
Describe alternatives you've considered
We are trying to require primary keys on all 3k models -- we could also require that we
warn_unenforced
an all of those primary key yml keys. That is extra work for for us and it adds 3k lines of bytes to our schema files.I saw a few potentially related issues that were closed in versions after 1.6: #7067 + #6754 -- but I'm not sure this actually addresses the feature. We are on
dbt-core 1.6.7
anddbt-snowflake 1.6.8
. Maybe this was already addressed?Who will this benefit?
Anyone using constraints on Snowflake/BQ/Redshift etc
Are you interested in contributing this feature?
If it is reasonably contained I could take a crack at it with some guidance. I did a cursory read of the constraints code and I couldn't really sort it out.
Anything else?
No response
The text was updated successfully, but these errors were encountered: