-
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
Check if a snowflake column exists before altering its comment #3149
Check if a snowflake column exists before altering its comment #3149
Conversation
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, don't hesitate to ping @drewbanin. CLA has not been signed by users: @elikastelein |
I've just signed the CLA now |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
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.
Nice one @elikastelein, this works for me locally!
Could you add a new test case to test/integration/060_persist_docs_test
for this functionality? This would look like a new models folder, models-column-missing
, containing model that has a description defined on a column that does not actually exist. Then, a new test script (TestPersistDocsColumnMissing
) that uses that model, runs dbt, and ensures it passes as expected. I believe BigQuery and (now) Snowflake will be able to handle this and pass, whereas Postgres and Redshift would fail. Let me know if you want any help, or more pointers to get started!
Could you also add a Changelog entry under v0.20.0 - Fixes, and add yourself to the list of contributors?
Hey @elikastelein, hope you're well! Just wanted to check in and see if you'd be able to add a test case for this change? More than happy to help with any pointers :) |
Hey @jtcohen6, thanks for the ping. Sorry about leaving this hanging. I'll get started on adding tests soon and let you know if I need any pointers |
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.
@elikastelein Nice work adding the test—I confirmed it fails without the change to snowflake__alter_column_comment
, and succeeds with it.
This LGTM, thank you for the contribution (:
@jtcohen6 thanks so much for the help, your comments were very helpful |
* Check if column exists when altering column comments in snowflake * Add new test class for persist docs models with missing columns * Parallel run all integration tests after unit (#3328) * don't clobber default args * update changelog * Update changelog for PR #3149 * Pull in upstream changes Co-authored-by: Jeremy Cohen <jeremy@fishtownanalytics.com> Co-authored-by: Kyle Wigley <kyle@fishtownanalytics.com>
Resolves #3039
Description
comment if exists
in BQ, redshift, or postgres so I did this PR for snowflake onlypersist_docs
defaults to off and users who are ultra-concerned with performance would most likely have it off anyways.Checklist
CHANGELOG.md
and added information about my change to the "dbt next" section.