-
Notifications
You must be signed in to change notification settings - Fork 9
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
Prefix macro calls #25
Comments
Hi @emmahunt, thanks for raising this issue! You will find you encounter this behaviour across all of our dbt packages. Whilst we could add the package name prefix to all the macros, we have no real way of enforcing this with future updates and package development work. I think it’s fair to say that if a user is customising any of the models, they should be expected to update these macros themselves. The returned error message is quite helpful here in identifying what is the issue, but perhaps we could add a note in our docs as something to keep in mind when customising any of the models. There might be other opinions here so will keep this ticket open for now. |
thanks for the reply and explanation George! I see your point. Just want to loop @rlh1994 into the conversation as I was discussing this with him as well 🙂 |
@georgewoodhead I think we should support this where possible, especially because we are use them so heavily throughout the package - I just need to remind myself if this impacts the ability of a user to overwrite the macro or not... |
Just verified, this does work still even with the prefix, so I think we should prefix them all to make it easier for users to make custom models then only overwrite the required ones in the future. It's not a high priority item but we should get round to it. |
Describe the bug
The unified package calls
snowow-utils
macros without a prefix, which throws errors in some circumstances e.g. overwriting custom models withoutsnowplow-utils
locally installedSteps to reproduce
Create a copy of the
snowplow_unified_sessions_this_run
model locally, disable the unified version of the model and rundbt run
ordbt compile
.Expected results
The custom model (copy) runs without issues
Actual results
An error message such as:
'platform_independent_fields' is undefined. This can happen when calling a macro that does not exist. Check for typos and/or install package dependencies with "dbt deps".
Screenshots and log output
System information
The contents of your
packages.yml
file:Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using:
MacOS 14.3 (23D56)
The output of
python --version
:Python 3.11.5
Additional context
N/A
Are you interested in contributing towards the fix?
Happy to contribute
The text was updated successfully, but these errors were encountered: