Added quote_identifiers argument#135
Added quote_identifiers argument#135drewbanin merged 2 commits intodbt-labs:masterfrom ArtifactUprising:feature/pivot-quote-parameter
Conversation
Indicates whether to surround column aliases with double quotes or not.
|
Thanks for making this PR @carlyfk! Can you tell me more about the problem you had which was solved by this PR? It looks to me like a Snowflake column caps/quoting thing, right? dbt-utils doesn't do a great job of consistently quoting columns/tables/schemas/databases in general, and I'm super interested in trying to fix that! I think PRs like this are a good idea, but I'm also interested in thinking about a more general approach to solving this type of problem for every macro in here! Let me know about the use case (for my edification). Can you also update the |
|
@drewbanin Thanks for your feedback! I think the issue was that one of my columns being generated is called NAME. The macro then outputs the SQL and NAME becomes "NAME". And then the rest of my downstream code fails because I'm referring to the column by NAME and not "NAME". By removing the forced quotes in the macro, I don't have to change any of my references downstream. Btw, this only became an issue with Snowflake and was not an issue in Redshift. I'll update the README.md document as well. :) As a side note, this is my first PR and I'm a relative beginner in git. I've managed to completely jack up my codebase as a result and am not sure how to deal with the whole submodule concept. Any recs for blogs I can read on how to do this cleanly? |
|
ok, thanks for the additional context!
That's amazing - this is super well done and I assumed this wasn't your first time around the block. Nice work!
Hmmm, submodules are definitely painful, but you shouldn't need one here! Did you clone dbt-utils into your I just kicked off the tests here - are you ready to merge this when they pass? |
|
Sorry, I'm not getting email notifications when you reply so I no idea. Let me know I need to do to merge! |
|
This is merged! We'll cut a new release, Thanks for your contribution to dbt-utils!! |
Indicates whether to surround column aliases with double quotes or not.