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
In dbt-labs/dbt-core#5888, we discovered that dbt projects that already contained a macro with the same name (e.g. concat()) as a cross-db macro were taking precedence in an unexpected manner.
@jtcohen6: given that dbt-labs/dbt-core#5907 is v1.3 only, should this change be made available to both dbt-utils 0.9.x (requires dbt Core 1.2+) and dbt-utils 1.0 (requires dbt Core 1.3+) or only the latter? Do you have a read on which approach will be safer?
Are you interested in contributing the fix?
I'd love to see a community contribution here - happy to help out if the specifics wind up being gnarly.
The text was updated successfully, but these errors were encountered:
@jtcohen6: given that dbt-labs/dbt-core#5907 is v1.3 only, should this change be made available to both dbt-utils 0.9.x (requires dbt Core 1.2+) and dbt-utils 1.0 (requires dbt Core 1.3+) or only the latter? Do you have a read on which approach will be safer?
I don't have a perfect read here. The bug was quite niche. It only cropped up if you have a custom generic test that calls a macro which used to live in dbt_utils and has since moved to dbt. Some of the generic tests in dbt_utils probably fall into that category, though.
For now, it's probably slightly safer to just make this change for dbt-utils v1.0. We could consider backporting the fix from dbt-labs/dbt-core#5907 for a dbt-core v1.2.x patch release, if we don't see any negative repercussions. It would make this decision simpler.
Describe the bug
In dbt-labs/dbt-core#5888, we discovered that dbt projects that already contained a macro with the same name (e.g.
concat()
) as a cross-db macro were taking precedence in an unexpected manner.We want to switch back to explicitly stating the namespace (i.e.
dbt.concat()
) so that the dispatch logic works correctly (dbt-labs/dbt-core#5720 and dbt-labs/dbt-core#5907).Additional context
The current best way I've come up with to handle this is a regex find and replace, using the list of cross-db macros from the docs site:
Replacing
{1}
withdbt.{1}
(I only know one trick, but it's a good trick)@jtcohen6: given that dbt-labs/dbt-core#5907 is v1.3 only, should this change be made available to both dbt-utils 0.9.x (requires dbt Core 1.2+) and dbt-utils 1.0 (requires dbt Core 1.3+) or only the latter? Do you have a read on which approach will be safer?
Are you interested in contributing the fix?
I'd love to see a community contribution here - happy to help out if the specifics wind up being gnarly.
The text was updated successfully, but these errors were encountered: