-
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” snapshot strategy fails if columns need to be quoted #2975
Comments
I'm pretty sure it's this line here (or the related function — we don't seem to be quoting the column names) |
Good call, it does seem like this could be a straightforward fix. There are two ways I think it could be done:
That fix feels like it could be a good first issue. The tricky bit would be testing, specifically:
I've opened another issue (#2986), bigger in scope, to corral the cacophony of inconsistencies with quoting as they exist today. |
I would like to pick this. |
Sure! Please go ahead :) |
@sou-joshi Have you made any progress on this? If not I'm happy to pick it up. |
We just encountered this very same issue. We have a lot of columns with spacing in our Snowflake database. Initial snapshot run materializes perfectly fine, but all subsequent runs fail due to columns not being wrapped with quotation marks. Thanks for working through this one! |
Unfortunately a problem for me as well. |
Describe the bug
If you use the "check" snapshot strategy (default) on data which contains columns with special characters in it and do one initial run and then a subsequent insert run. The second run will fail due to a syntax error (see "Screenshots and log output below").
Steps To Reproduce
(stolen from slack discussion: https://getdbt.slack.com/archives/CBSQTAPLG/p1608759471264100?thread_ts=1608758278.258300&cid=CBSQTAPLG)
Expected behavior
I expect the snapshot to not fail on columns containing special characters. Special characters should work as long as you enclose it with
"
.Screenshots and log output
System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using: MacOS Catalina Version 10.15.7 with Docker for Mac 3.0.3
The output of
python --version
: Python 3.8.6cc @clrcrl
The text was updated successfully, but these errors were encountered: