Skip to content
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

cannot override bultin macros #2032

Closed
beckjake opened this issue Jan 6, 2020 · 1 comment
Closed

cannot override bultin macros #2032

beckjake opened this issue Jan 6, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@beckjake
Copy link
Contributor

beckjake commented Jan 6, 2020

Describe the bug

Built-in macros can't be overridden in dbt run-operation, and dbt docs generate faces a similar problem where users cannot locally override get_catalog.

There are two parts to this bug:

  • One part is basically the same as Cannot override dbt default materializations #1962 but for regular macros, and without specificity handling (adapter_macro handles that).
  • The other part is that many macro calls that should support overriding (get_catalog is the big one!) currently do not, because they don't use the full manifest.

Steps To Reproduce

  • Override the get_catalog macro locally to raise: {% macro get_catalog(information_schemas) -%}{% do exceptions.raise_compiler_error('oops') %}{% endmacro %}
  • Note that dbt picks it up (macros count goes up by 1)
  • Note that dbt ignores the macro and runs the default one :(

Expected behavior

I expect dbt to use my macro, but instead it ignored it and used dbt.get_catalog.

System information

Any database, dbt >= 0.15.0, any python

@beckjake beckjake added bug Something isn't working triage labels Jan 6, 2020
@drewbanin drewbanin removed the triage label Jan 6, 2020
@drewbanin drewbanin added this to the Barbara Gittings milestone Jan 31, 2020
beckjake added a commit that referenced this issue Jan 31, 2020
@beckjake
Copy link
Contributor Author

beckjake commented Feb 3, 2020

Fixed in #2035

@beckjake beckjake closed this as completed Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants