CheckOps
dbt tests
dbt tests are the built-in data tests and unit tests of dbt, the Apache-2.0 data transformation framework, used to validate models with unique, not_null, accepted_values and relationships checks.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
dbt lets data teams transform data with software engineering practices, and testing is built in. Data tests are assertions on models: generic tests such as unique, not_null, accepted_values and relationships are declared in YAML, and singular tests are SQL queries that return failing rows.
Unit tests check model logic on static inputs before building. dbt test runs tests, and dbt build runs models and tests in order so failures stop downstream builds. The README notes that main now contains dbt v2.0, a ground-up rewrite in Rust under Apache-2.0, while v1 continues on the 1.latest branch.
In the quality loop dbt tests gate data pipelines.
The source code is at dbt-labs/dbt on GitHub under the Apache-2.0 licence, with about 14,100 stars; the most recent commit was on 11 November 2026.
Features
- Generic data tests: unique, not_null, accepted_values, relationships.
- Singular tests: Custom SQL checks.
- Unit tests: Static input checks.
- dbt build: Models and tests in DAG order.
- Severity: Warn or error.
- Packages: Extra tests from packages.
Pros
- Built in: No extra tool for basic data tests.
- Free to use: Open source under the Apache-2.0 licence, so the core tool costs nothing to use.
- Actively maintained: The repository had commits as recent as 11 November 2026.
- Community: About 14,100 GitHub stars.
Cons
- Warehouse cost: Tests run queries.
- dbt-specific: Only for dbt projects.
- v2 transition: Rust rewrite changes tooling.
Usage and Links (Example)
models:
- name: orders
columns:
- name: order_id
data_tests: [unique, not_null]
- name: status
data_tests:
- accepted_values:
arguments: { values: ['placed','shipped','returned'] }
Resources:
Pricing
dbt tests is free and open source under the Apache-2.0 licence.
Recommended for?
- Analytics engineers using dbt.
Conclusion
dbt tests are the first line of defence for data models.
Add unit tests for complex logic.
On CheckOps, dbt tests is filed under the Unit testing and Release & CI gates stages. Related tools listed here include pgTAP, utPLSQL, SQLFluff, Atlas, Squawk and Database Lab Engine. Which one fits best depends mostly on your stack, your team’s size and skills, and whether you prefer to run tools yourself or pay for a managed service. This page reflects the official website, documentation and repository as they stood on 11 November 2026.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with dbt tests side by side.
- PpgTAPpgTAP is a unit testing framework for PostgreSQL written in PL/pgSQL and PL/SQL, providing TAP-emitting assertions for schema, data and functions, run with pg_prove.Compare with dbt tests
UutPLSQLutPLSQL is an Apache-2.0 unit testing framework for Oracle PL/SQL and SQL, with annotations, rich expectations and reporters for SonarQube, Jenkins and TeamCity.Compare with dbt tests
SSQLFluffSQLFluff is an MIT dialect-flexible SQL linter and auto-formatter with Jinja and dbt templating support.Compare with dbt tests
AAtlasAtlas is an Apache-2.0 schema-as-code tool from Ariga for declarative and versioned database migrations, with migration linting and schema tests in CI.Compare with dbt tests
SSquawkSquawk is an Apache-2.0 linter for PostgreSQL migrations that flags changes likely to cause downtime, with a CLI, Docker image, GitHub Action and browser playground.Compare with dbt tests
DDatabase Lab EngineDatabase Lab Engine (DBLab) is Postgres.ai's Apache-2.0 tool for thin cloning and branching of large PostgreSQL databases in seconds for development and testing.Compare with dbt tests