Skip to content
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

Collisions in dbt_scd_id while calculating snapshots bug #168

Merged
merged 5 commits into from
Jun 17, 2024

Conversation

tallamohan
Copy link
Contributor

resolves #160

@@ -1,6 +1,6 @@

{% macro teradata__snapshot_hash_arguments(args) -%}
HASHROW({%- for arg in args -%}
GLOBAL_FUNCTIONS.hash_md5({%- for arg in args -%}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest using the dbt.hash macro since the md5 function is configured differently in every environment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would also require dbt.hash to be configurable. One proposal on how to do that can be found here: Teradata/dbt-teradata-utils#2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regrettably, our md5 implementation differs from the standard. Therefore, in our project, we have developed our own teradata__hash macro to align with the database configuration. Consequently, to accommodate this modification, we will also need to create a distinct implementation of teradata__snapshot_hash_arguments to cater to the custom md5 setup.

@tallamohan
Copy link
Contributor Author

@rafaelkrysciak and @septimit we are modifying this implementation.
Adding a new configuration option at the profile level and at the model level to provide the custom database name and UDF name.

README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@VarunSharma15 VarunSharma15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good to me

@tallamohan tallamohan changed the base branch from main to release_branch_1.8 June 17, 2024 11:14
@tallamohan tallamohan merged commit fc77a44 into release_branch_1.8 Jun 17, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collisions in dbt_scd_id while calculating snapshots
4 participants