A curated collection of Agent Skills for working with dbt, to help AI agents understand and execute dbt workflows more effectively.
91
91%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Advisory
Suggest reviewing before use
Model versioning lets you introduce breaking changes to a contracted model while giving downstream consumers a migration window. Multiple versions coexist in the same codebase and data environment simultaneously — similar to API versioning.
Version a model only for breaking changes to a contract:
Do NOT version for:
models:
- name: fct_orders
latest_version: 1
config:
access: public
contract:
enforced: true
columns:
- name: order_id
data_type: varchar
- name: customer_id
data_type: varchar
- name: order_total
data_type: number
- name: tax_paid
data_type: number
- name: ordered_at
data_type: timestamp_ntz
versions:
- v: 1
config:
alias: fct_orders # Without this, resolves to fct_orders_v1When you need to rename order_total to order_amount and change a data type:
models:
- name: fct_orders
latest_version: 1 # Keep pointing to v1 until consumers migrate
config:
access: public
contract:
enforced: true
columns:
- name: order_id
data_type: varchar
- name: customer_id
data_type: varchar
- name: order_total
data_type: number
- name: tax_paid
data_type: number
- name: ordered_at
data_type: timestamp_ntz
versions:
- v: 1
config:
alias: fct_orders
- v: 2
columns:
- include: all
exclude: [order_total] # Remove old column name
- name: order_amount # Add new column name
data_type: number
- name: ordered_at # Change data type
data_type: dateWithin a version's columns key:
include: all — inherit all columns from the parent model definitionexclude: [col1, col2] — remove specific columns from the inherited setEach version needs its own SQL file:
| Version | SQL File |
|---|---|
| v1 (latest) | fct_orders.sql or fct_orders_v1.sql |
| v2 (prerelease) | fct_orders_v2.sql |
| Old version | fct_orders_v1.sql |
Use defined_in to specify a custom file name:
versions:
- v: 1
defined_in: fct_orders_v1 # Points to fct_orders_v1.sql
config:
alias: fct_orders
- v: 2| Version State | Default Relation Name |
|---|---|
| Latest version | fct_orders (via alias) or fct_orders_v{N} |
| Non-latest version | fct_orders_v{N} |
Use config.alias on the latest version to maintain the original table name for backward compatibility.
-- Reference the latest version (resolves to latest_version)
select * from {{ ref('fct_orders') }}
-- Reference a specific version explicitly
select * from {{ ref('fct_orders', v=2) }}
-- Cross-project reference with version
select * from {{ ref('upstream_project', 'fct_orders', v=1) }}Unpinned ref() calls resolve to latest_version. When you bump latest_version, all unpinned refs automatically point to the new version.
# Run all versions of a model
dbt run --select fct_orders
# Run a specific version
dbt run --select fct_orders_v2
# Run only the latest version
dbt run -s fct_orders,version:latestcolumns changes but keep latest_version pointing to the old versionref() calls to the new version (or pin to the old one)latest_version to the new version once consumers have migratedversions:
- v: 1
deprecation_date: 2025-06-01 00:00:00.00+00:00By default, unit tests run against all versions of a model. To target a specific version:
unit_tests:
- name: test_order_amount_calculation
model: fct_orders
versions:
include:
- 2 # Only test v2| Mistake | Fix |
|---|---|
| Versioning for additive changes | New columns are non-breaking — just add them to the contract |
Bumping latest_version before consumers migrate | Keep latest_version on the old version until migration is complete |
Forgetting config.alias on latest version | Without alias, the relation name includes the version suffix |
| Not creating a SQL file for the new version | Each version needs its own SQL file (or a defined_in reference) |
| Removing old version too quickly | Set a deprecation date and give consumers a migration window |
evals
scenarios
dbt-docs-arguments
dbt-docs-unit-test-fixtures
dbt-job-failure
dbt-unit-test-format-choice
example-yaml-error
fusion-migration-triage-basic
fusion-migration-triage-blocked
fusion-triage-cat-a-static-analysis
fusion-triage-cat-b-dict-meta-get
fusion-triage-cat-b-unexpected-config
fusion-triage-cat-b-unused-schema
fusion-triage-cat-b-yaml-syntax
fusion-triage-cat-c-hardcoded-fqn
src
tests
scripts
skills
dbt
skills
adding-dbt-unit-test
references
answering-natural-language-questions-with-dbt
building-dbt-semantic-layer
configuring-dbt-mcp-server
fetching-dbt-docs
scripts
running-dbt-commands
troubleshooting-dbt-job-errors
references
using-dbt-for-analytics-engineering
working-with-dbt-mesh
dbt-extras
skills
creating-mermaid-dbt-dag
dbt-migration
skills
migrating-dbt-core-to-fusion
migrating-dbt-project-across-platforms