Skip to content
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

Fix/fix quotes behaviour in snapshots #5389

Merged

Conversation

pquadri
Copy link
Contributor

@pquadri pquadri commented Jun 17, 2022

resolves #2975

Description

At least on Snowflake, using the check_columns='all' strategy for snapshots does not properly take into account quotes in column names. With this PR the quotes are added automatically if the adapter supports them. I think it should work on all the databases since the name of the column is taken directly from the database itself.

Checklist

@pquadri pquadri requested a review from a team June 17, 2022 09:38
@pquadri pquadri requested review from a team as code owners June 17, 2022 09:38
@cla-bot cla-bot bot added the cla:yes label Jun 17, 2022
@dbeatty10 dbeatty10 added snapshots Issues related to dbt's snapshot functionality and removed snapshots Issues related to dbt's snapshot functionality labels Jun 17, 2022
@jtcohen6 jtcohen6 added Team:Adapters Issues designated for the adapter area of the code ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering labels Jun 28, 2022
Copy link
Contributor

@iknox-fa iknox-fa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@leahwicz leahwicz merged commit febbd97 into dbt-labs:main Jul 6, 2022
@pquadri pquadri deleted the fix/fix-quotes-behaviour-in-snapshots branch July 18, 2022 12:02
agoblet pushed a commit to BigDataRepublic/dbt-core that referenced this pull request Sep 16, 2022
* fix: add quotes to relation

* fix: add quotes correctly

* chore: reset main.py

* chore: reset main.py from master

* chore: newline

* chore: changie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering Team:Adapters Issues designated for the adapter area of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

“check” snapshot strategy fails if columns need to be quoted
5 participants