-
Notifications
You must be signed in to change notification settings - Fork 504
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 - Quote columns in unpivot #626
Conversation
Thanks for taking this on @GtheSheep!
Yes I think it should!
I don't think so - normally for dbt utils, we aren't trying to be clever and inspect the state of yaml files. I personally consider it a bit of an antipattern to hide configuration behaviour for macros inside of yaml, because it means you have to check two places to understand how it's going to work. (If there was a global quote_columns config ever added to dbt_project.yml, I'd probably change my tune). Does that get you unstuck? Sorry for the delay in getting back to you 🐌 |
Hey @joellabes thanks for this, super helpful! yeah I was thinking there was a global config for Thanks 😸 |
@GtheSheep Heads up that we've just done some surgery on the unpivot macro (most notably #671). Will be putting out a first beta of dbt utils 1.0 in the immediate future, which you'll probably want to pull into this branch. Would love to get these changes into 1.0 as well if possible, so that we can keep all the behavioural changes to a single release. Doesn't matter as much for this one because it's backwards compatible. |
@GtheSheep & @joellabes - Is there a known workaround I can use while the PR process continues? |
bfb8981
to
68be94e
Compare
eaa3a7a
to
e0406d3
Compare
Any comment on why this PR was closed? Is this open to be picked up by someone else? |
This is a:
Description & motivation
Closes #216
When unpivoting column names that require quotations (dates, strings with spaces, etc)
unpivot.sql
doesn't respectquote_columns=true
or anything like that.I wanted to open this to get input on best methodology before adding tests:
quote_columns
config instead?Checklist
star()
source)limit_zero()
macro in place of the literal string:limit 0
dbt_utils.type_*
macros instead of explicit datatypes (e.g.dbt_utils.type_timestamp()
instead ofTIMESTAMP