-
Notifications
You must be signed in to change notification settings - Fork 175
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
[ADAP-625] [Feature] Support for Multiple Query Tags from different keys #662
Comments
hey @joris-swapfiets great suggestion and it is entirely feasible. Query tagging was originally added in dbt-labs/dbt-core#2555 (back when the snowflake code still lived within dbt-core). afaict, the mechanics for generating the query tag lives below. That said, I have to do some double-checking on the mechanics of dbt-snowflake/dbt/include/snowflake/macros/adapters.sql Lines 288 to 297 in c613723
You can play around with this macro easily by adding the {{ log('JORIS: the query_tag is: ' ~ query_tag, info=True) }} |
@dataders I've played around quite a bit with this macro but indeed it seems the top_level:
+meta:
key1: "value1"
child:
+meta:
key2: "value2" The |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers. |
Is this your first time submitting a feature request?
Describe the feature
Description
The current implementation of the
+query_tag
parameter in dbt-snowflake only supports a single query tag at a time. This feature request aims to enhance the functionality by allowing the merging of multiple query tags defined in thedbt_project.yml
configuration file.Proposed Solution
The proposed solution involves modifying the
+query_tag
behavior to merge multiple query tags together into a JSON string. Each query tag specified in the model-configs section ofdbt_project.yml
will contribute to the final merged query tag for each model.Example
Consider the following
dbt_project.yml
configuration:rating
folder is executed, the resulting query tag should be:{"repository": "dbt_reporting", "department": "consumer_direct", "domain": "rating"}
.marketing
folder is executed, the resulting query tag should be:{"repository": "dbt_reporting", "department": "consumer_direct", "domain": "marketing"}
.Describe alternatives you've considered
No response
Who will this benefit?
Benefits
Are you interested in contributing this feature?
No response
Anything else?
Additional Considerations
inherit_parent_tags
to either include or overwrite the parent-level query tags.dbt_project.yml
configuration, where the parent-level tags are merged first, followed by child-level tags.The text was updated successfully, but these errors were encountered: