You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a macro is addressed twice in a dbt project, then dbt will fail to compile with:
Compilation Error
dbt found two macros named "<macro name>" in the project "projectname".
To fix this error, rename or remove one of the following macros:
- dbt_modules/package/macros/my_macro.sql
- dbt_modules/package/macros/my_macro.sql
This is confusing because there is actually on a single file and the macro is not defined twice, dbt just doesn't recognize that it has already parsed the file.
The root cause of an error like this is a misconfiguration like:
macro-paths: [macros, dbt_modules/package/macros]
Instead, dbt should raise the following error if a file is parsed twice in parsing:
Compilation Error
The file <filepath> was parsed multiple times by dbt.
This error happens when a path is duplicated in a dbt_project.yml configuration.
Check your `dbt_project.yml` file path configurations and remove any
duplicated paths to fix this error.
Describe alternatives you've considered
We could optionally allow the duplicate paths, raise a warning, and continue on. I'm amenable to that, but I don't think there's any real merit to supporting it!
Who will this benefit?
Clearer error messages are good for everyone
The text was updated successfully, but these errors were encountered:
Describe the feature
If a macro is addressed twice in a dbt project, then dbt will fail to compile with:
This is confusing because there is actually on a single file and the macro is not defined twice, dbt just doesn't recognize that it has already parsed the file.
The root cause of an error like this is a misconfiguration like:
Instead, dbt should raise the following error if a file is parsed twice in parsing:
Describe alternatives you've considered
We could optionally allow the duplicate paths, raise a warning, and continue on. I'm amenable to that, but I don't think there's any real merit to supporting it!
Who will this benefit?
Clearer error messages are good for everyone
The text was updated successfully, but these errors were encountered: