-
Notifications
You must be signed in to change notification settings - Fork 515
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
Change union macro to not always include the _dbt_source_relation column #331
Comments
Hi @joellabes , that would be a great feature. I look forward to seeing its release in the future. I'd like to suggest another feature to the Ex: table 1
table 2
unioned table
instead of
|
@chloe-lubin thanks for suggesting this! Could I ask you to open a new issue so that it can be prioritised/discovered separately to this one? |
No problem! I opened a new issue here. |
@joellabes is there any plans to add this feature? |
@christineberger I have to say that I absolutely agree with my past self here! The joys of triaging issues you made while still on the outside 😅 I think passing in If not, I'll try and get it done before utils 1.0.0, which we're starting to think pretty seriously about |
Resolved by #624 |
Describe the feature
When developing, the _dbt_source_relation column from the union macro is useful to check that things are behaving properly, but once it's all working properly I don't like exposing implementation details to output models. I'd like to be able to opt out of that column being added at the front of my model.
Describe alternatives you've considered
except
argWho will this benefit?
Me! In this case, it's a legacy hard-delete-finding snapshot using my snapshot-sandwich approach, and we've added another column but they're out of order and don't union nicely anymore.
Are you interested in contributing this feature?
Yes - I was planning to just wrap the
cast({{ dbt_utils.string_literal(relation) }} as {{ dbt_utils.type_string() }}) as {{ source_column_name }}
line in an{% if source_column_name %}
block, so you can passNone
in if you don't want the column. Open to alternative approaches though (a new bool is more explicit, but getting towards a pretty unwieldy signature)The text was updated successfully, but these errors were encountered: