-
Notifications
You must be signed in to change notification settings - Fork 113
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
Rename hashing functions #199
base: master
Are you sure you want to change the base?
Conversation
Hi! Whilst we appreciate the intent behind this, this is going to have too much knock-on effect in our codebase and to our user-base. I would recommend using the built-in dbt functionality for solving this issue. Essentially: # dbt_project.yml
dispatch:
- macro_namespace: 'my_project'
search_order: ['my_project', 'automate_dv', 'dbt'] This should ensure your project version of hash overrides dbt's and automate_dv's version correctly. |
I'm using this config (Also tried as you sent), and it doesn't work:
Trying to run a test with elementary throws:
Which happens because it tries to use my overriden hash. If this is an unacceptable change, i'll have to work off my fork then Thanks anyway! |
That is frustrating. I would recommend instead reporting this as a bug on dbt-core instead. Failing that, try to remove the |
I tried also without |
This PR renames the hash function to dv_hash; this is to avoid conflicts with
dbt.hash
.Even though the function is namespaced, when a project wants to replace the hashing function (e.g. i wanted it to generate a sha-224 string instead of sha-256 binary field), it replaces default__hash, which affects dbt.hash and whichever functions depend on it, like the generate_surrogate_key function in dbt_utils.
I'm open to other approaches if you can suggest any, thanks!