Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

query_tag defined in model config disables +query_tag from dbt_project.yml #44

@imamAtif

Description

@imamAtif

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"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions