How to Use Tags in dbt
Last updated July 25, 2026 · By the SaturnSQL team
Tags label models, seeds, snapshots, and tests so you can select them as a group: dbt run --select tag:nightly. Set tags in a model's config block or on whole folders in dbt_project.yml; tags accumulate rather than overwrite.
Tagging models
Tags set in a config block live with the model, which makes them easy to spot when reading the file. A model can carry several tags at once, and selecting by any one of them includes it in the run.
{{ config(tags=['nightly', 'finance']) }}Folder-level tags
Setting +tags in dbt_project.yml applies the tag to every model in that folder and below, with the plus prefix marking it as a config rather than a folder name. Folder tags and in-model tags combine rather than override, so a model in marts/finance/ that also sets config(tags=['nightly']) ends up with both.
# dbt_project.yml
models:
my_project:
marts:
finance:
+tags: ['finance']Selecting by tag
tag: selectors compose with the rest of the selection syntax, so you can union them, intersect them, or combine them with graph operators like tag:finance+ to include everything downstream. --exclude accepts the same syntax. dbt ls --select tag:nightly lists what would run without running it, which is worth checking before a large build.
dbt run --select tag:nightly
dbt build --select tag:finance --exclude tag:deprecatedRun this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free