Working with Tags
What Are Tags?
How to Apply Tags
1. Defining Tags in a Model File
{{ config(
tags=["finance", "daily_refresh"]
) }}
SELECT *
FROM {{ ref('stg_transactions') }}2. Defining Tags in dbt_project.yml
dbt_project.ymlTag Inheritance
Applying Tags to Different Resource Types
Snapshots
Seeds
Sources
Using Tags for Selection
Selection Examples
Command
Description
Tag Selection Patterns
Selection Pattern
What It Selects
Example
Best Practices for Using Tags
Use Consistent Naming Conventions
Document Your Tagging Strategy
Use Granular Tags
Tag Models by Layer
Common Use Cases for Tags
Refresh Scheduling
Data Classification
Testing Strategy
Troubleshooting Tag Issues
Tag Inheritance Issues
Selection Syntax Errors
Using dbt ls to Validate Tags
Last updated
Was this helpful?