dbt Unit Tests (dbt Labs)
Creates unit test YAML definitions that mock upstream model inputs and validate expected outputs. Use when adding unit tests for a dbt model or practicing test-driven development (TDD) in dbt.
Creates unit test YAML definitions that mock upstream model inputs and validate expected outputs. Use when adding unit tests for a dbt model or practicing test-driven development (TDD) in dbt.
Real data. Real impact.
Emerging
Developers
Per week
Excellent
Skills give you superpowers. Install in 30 seconds.
What it does. - Spec Reference - All required and optional YAML keys for unit tests - Examples - Unit test examples across formats (dict, csv, sql) - Incremental Models - Unit testing incremental models - Ephemeral Dependencies - Unit testing models depending on ephemeral models - Special Case Overrides - Introspective macros, project variables, environment variables - Versioned Models - Unit testing versioned SQL models - BigQuery Caveats - BigQuery-specific caveats - BigQuery Data Types - BigQuery data type handling - Postgres Data Types - Postgres data type handling - Redshift Caveats - Redshift-specific caveats - Redshift Data Types - Redshift data type handling - Snowflake Data Types - Snowflake data type handling - Spark Data Types - Spark data type handling
dbt unit tests validate SQL modeling logic on static inputs before materializing in production. If any unit test for a model fails, dbt will not materialize that model.
Highlights
When to use it. Creates unit test YAML definitions that mock upstream model inputs and validate expected outputs. Use when adding unit tests for a dbt model or practicing test-driven development (TDD) in dbt.
Install
npx skills add dbt-labs/dbt-agent-skills --skill adding-dbt-unit-test
Or copy the skill folder manually:
git clone https://github.com/dbt-labs/dbt-agent-skills.git cp -r dbt-agent-skills/skills/dbt/skills/adding-dbt-unit-test/ ~/.claude/skills/adding-dbt-unit-test
Source: dbt-labs/dbt-agent-skills — 699 stars, Apache-2.0, last pushed 2026-09-01.
Apache-2.0
npx skills add dbt-labs/dbt-agent-skills --skill adding-dbt-unit-test4,600+ AI skills, agents & workflows. Install in 60 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.