I'm using the get-select/dbt_snowflake_query_tags package (version 2.5.3) to apply standardized query tagging in Snowflake via dbt_project.yml .
My goal is to define common +query_tag metadata globally in dbt_project.yml like this:
models:
+query_tag:
source: 'source-1'
stage: 'source-derived'
environment: '{{ env_var("ENVIRONMENT") }}'
version: '1.0.0'
data_type: 'raw'
However, when I define a model-specific query_tag in a model's config like below:
{{ config(
query_tag={
"team": "team-value-override"
}
) }}
The package completely ignores the +query_tag config in dbt_project.yml, and only the model-level query_tag is applied. None of the globally defined fields (like source, stage, etc.) are present in the final query tag.
Expected Behavior:
I expected the query_tag value defined inside a model to extend or override fields selectively from the global +query_tag defined in dbt_project.yml, rather than replace it entirely.
For example, if the model-level query_tag includes only one field (version: "2.0"), I would expect the final tag to merge with the global config and result in:
{
"source": "spectre",
"stage": "source-derived",
"environment": "prod",
"version": "2.0", -- overridden
"data_type": "claims"
}
I'm using the
get-select/dbt_snowflake_query_tagspackage (version 2.5.3) to apply standardized query tagging in Snowflake viadbt_project.yml.My goal is to define common +query_tag metadata globally in dbt_project.yml like this:
However, when I define a model-specific query_tag in a model's config like below:
The package completely ignores the
+query_tagconfig indbt_project.yml, and only the model-level query_tag is applied. None of the globally defined fields (like source, stage, etc.) are present in the final query tag.Expected Behavior:
I expected the query_tag value defined inside a model to extend or override fields selectively from the global +query_tag defined in dbt_project.yml, rather than replace it entirely.
For example, if the model-level query_tag includes only one field
(version: "2.0"),I would expect the final tag to merge with the global config and result in: