tags
- Project file
- Config property
- Config block
dbt_project.yml
models:
<resource-path>:
+tags: <string> | [<string>]
snapshots:
<resource-path>:
+tags: <string> | [<string>]
seeds:
<resource-path>:
+tags: <string> | [<string>]
models/resources.yml
version: 2
models:
- name: model_name
config:
tags: <string> | [<string>]
columns:
- name: column_name
tags: [<string>]
tests:
<test-name>:
config:
tags: <string> | [<string>]
{{ config(
tags="<string>" | ["<string>"]
) }}
Definition
Apply a tag (or list of tags) to a resource.
These tags can be used as part of the resource selection syntax, when running the following commands:
dbt run --select tag:my_tag
dbt seed --select tag:my_tag
dbt snapshot --select tag:my_tag
dbt test --select tag:my_tag
(indirectly runs all tests associated with the models that are tagged)