-
Notifications
You must be signed in to change notification settings - Fork 510
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
add generate_surrogate_key macro #685
Conversation
* Update from template to dbt copyright I want to give proper attribution and licensing to code from dbt_utils that I'm using, so made this fix. Hope it's ok. * Update LICENSE
@joellabes -- assuming tests pass here I think we're in decent shape -- decided not to take the handling for non-list args into the new world of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wonderful! Thank you @dave-connors-3. In the interest of getting the next beta out, I'm going to accept my suggestions and merge this, but if you want to make any changes then there will be another beta release before GA I'm sure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤩 😍
resolves #488
This is a:
All pull requests from community contributors should target the
main
branch (default).Description & motivation
This PR is a breaking change for users of the
surrogate_key
macro --dbt_utils.surrogate_key
now throws a compilation error, and thegenerate_surrogate_key
macro uses a default value for the coalesce function of_dbt_utils_surrogate_key_null_
to disambiguate from empty string values.Parity can be achieved by adding a boolean variable to your dbt project:
Checklist
star()
source)limit_zero()
macro in place of the literal string:limit 0
dbt.type_*
macros instead of explicit datatypes (e.g.dbt.type_timestamp()
instead ofTIMESTAMP