Skip to content

[Bug] When using the new format for tags (tags under config), column tests do not inherit the column level tags - causing differences in test selection #11984

@Daniel-Wiszowaty

Description

@Daniel-Wiszowaty

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

When having column level tags, the selection does not get picked up through dbt test -s "tag:tag"

Expected Behavior

The tests do get picked up.

Steps To Reproduce

version: 2

models:
  - name: orders
    columns:
      - name: order_id
        config:
          tags: [my_column_tag] # does not work
        data_tests:
          - unique

Run dbt test -s "tag:my_column_tag"

The selection criterion 'tag:my_column_tag' does not match any enabled nodes

The solution for now is to have test level tags

version: 2

models:
  - name: orders
    columns:
      - name: order_id
        data_tests:
          - unique:
            config:
              tags: [my_test_tag] # does somehow work but it's 2x code for unique and not_null

Relevant log output

Environment

- OS: MacOS
- Python:
- dbt: 1.10.10 Versionless Cloud

Which database adapter are you using with dbt?

snowflake

Additional Context

We got the issue after dbt 1.10 & dbt-autofix
Docs

If we remove the config: and indentation it seems to work, so something is off with the new config

Possible regression in #11839 ?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions