-
Notifications
You must be signed in to change notification settings - Fork 40
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
[CT-2492] [Bug] Update snapshot logic to use dbt.hash instead of hardcoded md5 #82
Comments
@graciegoheen Are you thinking about other data platforms that don't support IIRC, BigQuery is one such example. Looks like we've reimplemented this macro over there: {% macro bigquery__snapshot_hash_arguments(args) -%}
to_hex(md5(concat({%- for arg in args -%}
coalesce(cast({{ arg }} as string), ''){% if not loop.last %}, '|',{% endif -%}
{%- endfor -%}
)))
{%- endmacro %} When we could just be using the cross-db |
That's right. For your BigQuery example, we already have a hash override for BigQuery, so also having the
The other different here for BigQuery's It looks like Spark does something similar for |
Consider me a fan of cross-database implementations! 💪 If a more cross-database implementation of The implementation might feel a bit complicated due to But would be nice if this worked out so we could remove more hard-coded SQL function names from dbt-core. |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers. |
Is this a new bug in dbt-core?
Current Behavior
Currently,
dbt_scd_id
is built with a hardcodedmd5()
.Expected Behavior
Instead,
dbt_scd_id
should be built using{{ dbt.hash(...) }}
to remove hard-codedmd5()
.Steps To Reproduce
Run a dbt snapshot
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: