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

add set/unset_query_tag to the dbt macro namespace #132

Merged
merged 10 commits into from
Jun 7, 2022

Conversation

robscriva
Copy link
Contributor

@robscriva robscriva commented Apr 6, 2022

resolves #133

Description

There is no way of overriding the set_query_tag and unset_query_tag macros to create a custom query tag within an external package. This is because these macros aren't part of the dbt namespace and therefore cannot be overridden with dispatching precedence in the project. This change adds both macros to the dbt macro namespace so they can be overridden externally.

Discussion here: https://getdbt.slack.com/archives/C37J8BQEL/p1633519489312300?thread_ts=1633377998.228400&cid=C37J8BQEL

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt-snowflake next" section.

@robscriva robscriva marked this pull request as ready for review April 6, 2022 21:45
Copy link
Contributor

@jtcohen6 jtcohen6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robscriva Looking good! One comment from me. Otherwise, this will be good to ship in v1.2.

dbt/include/snowflake/macros/adapters.sql Outdated Show resolved Hide resolved
@jtcohen6
Copy link
Contributor

Not sure what's going on with those test failures, will need to take a more detailed look

@robscriva
Copy link
Contributor Author

Just a coincidence after I swapped to use the snowflake__ prefix right? 😂

@jtcohen6
Copy link
Contributor

jtcohen6 commented May 2, 2022

@robscriva Definitely a coincidence. We're seeing those tests fail in the main branch as well, on nightly runs (e.g. this one). Sorry that your PR is being held up in the meantime.

Copy link
Contributor

@jtcohen6 jtcohen6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robscriva Looks great, thank you!

I just added a contributor entry. We can merge as soon as the tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-460] Add set_query_tag to the dbt macro namespace
3 participants