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 an adapter plugin macro and a macro defined in dbt-core have the same name, dbt gives a bad error:
'ParsedMacro' object has no attribute 'namespace'
This happens because dbt.exceptions.raise_duplicate_macro_name accesses macro_1.namespace. It should be macro_1.name.
Steps To Reproduce
Create an adapter plugin with a macro that has a name the same as one in core (or another plugin). For example, is_incremental. Install that plugin, run dbt.
Expected behavior
I should get an error indicating that two macros that ended up in the same namespace have the same name.
Screenshots and log output
N/A
System information
Which database are you using dbt with?
postgres
redshift
bigquery
snowflake
other (specify: any custom adapter)
The output of dbt --version:
0.16.0
The operating system you're using:
any
The output of python --version:
any
Additional context
This issue is a real pain to surface and writing a real integration test for it would be a real chore, but we could at least unit test it!
I would like to get this into 0.16.1, if possible. It's a small fix and buggy error handling is always embarrassing.
The text was updated successfully, but these errors were encountered:
For what it is worth, I ran into this problem today with a fresh install of dbt 0.16.0 and dbt-sqlserver adapter (0.15.1). Thanks @beckjake for finding this and fixing it!
Describe the bug
If an adapter plugin macro and a macro defined in dbt-core have the same name, dbt gives a bad error:
This happens because
dbt.exceptions.raise_duplicate_macro_name
accessesmacro_1.namespace
. It should bemacro_1.name
.Steps To Reproduce
Create an adapter plugin with a macro that has a name the same as one in core (or another plugin). For example,
is_incremental
. Install that plugin, run dbt.Expected behavior
I should get an error indicating that two macros that ended up in the same namespace have the same name.
Screenshots and log output
N/A
System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using:
any
The output of
python --version
:any
Additional context
This issue is a real pain to surface and writing a real integration test for it would be a real chore, but we could at least unit test it!
I would like to get this into 0.16.1, if possible. It's a small fix and buggy error handling is always embarrassing.
The text was updated successfully, but these errors were encountered: