Tags
Tags in dex allow you to organize, classify, and filter models based on custom labels. They help teams manage large projects by grouping models by purpose, domain, update frequency, team ownership, or deployment behavior.
Tags are especially useful when:
You want to run only a subset of models in a Flow
You need to isolate models owned by a specific team or department
You want to flag models for a specific DAG layer (e.g.
gold
,finance
,staging
)You need to run models with specific update schedules (e.g. hourly vs. daily)
Tags are simple, flexible, and easy to apply—yet powerful when used with dex’s orchestration, lineage, and filtering features.
How to Add Tags
Tags are defined in your model using the config()
block:
{{ config(
materialized='table',
tags=['daily', 'finance']
) }}
select *
from {{ ref('orders') }}
You can assign one or more tags to a model. Tags must be provided as a list of strings.
Where Tags Are Used
Tags in dex can be used in:
Flows: to run only models with a given tag (e.g. all
daily
jobs or allmarketing
models)Lineage and Explorer: to visually filter and group models by tag
Build and CI/CD workflows: to include or exclude specific sets of models
Governance: to apply review policies, ownership boundaries, or SLA labels
Example Use Cases
Example Use Cases
finance
Identify models used in financial reporting
daily
Run this model on a daily schedule
deprecated
Flag a model for future removal
staging
Mark this as a staging-layer model
ml_inputs
Used in machine learning feature pipelines
external
Consumes data from a third-party or external API
You can create your own taxonomy of tags to reflect how your team thinks about and manages data.
Filtering by Tag in Flows
When configuring a Flow, you can choose to run:
All models
Specific models
Models that have a given tag
This is useful for setting up specialized Flows such as:
Running only
hourly
jobsRebuilding all
gold
layer modelsTesting only
experimental
models in a dev environment
Example Project Snippet
{{ config(
materialized='incremental',
tags=['ml_inputs', 'hourly']
) }}
select
customer_id,
avg(session_length) as avg_session_time
from {{ ref('web_sessions') }}
group by customer_id
This model is tagged for use in both machine learning pipelines and hourly flows.
Best Practices
Use lowercase, underscore-separated names (e.g.
marketing_reports
, notMarketingReports
)Keep your tag vocabulary consistent across the project
Use tags to reflect functional or operational intent (e.g.
hourly
,external
,mart
)Combine tags with documentation for better discoverability
Regularly clean up unused or outdated tags
Last updated
Was this helpful?