Static analysis and health report generator for dbt projects
Project description
dbt-tester
dbt-tester is a lightweight static analysis tool that inspects dbt projects without running dbt itself. It scans your models, schema YAML files, and compiled manifest metadata to catch missing documentation, test coverage gaps, naming inconsistencies, and lineage issues. The CLI outputs results in the terminal or exports shareable HTML/JSON reports, making it easy to embed into CI pipelines.
Features
- Discovers all models, sources, and tests in a dbt project directory
- Plug-in style check engine grouped by models, tests, docs, lineage, and sources
- Console, HTML, and JSON reporters with severity levels
- Configurable failure threshold for CI/CD
- Simple to extend with custom checks
Quick start
python -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
dbt-tester run path/to/dbt_project --format console
- Quotes are required when the project path contains spaces:
dbt-tester run "/home/me/dbt project" --format console. - Use
--format html --output report.htmlto produce a shareable artifact (.html), or--format json --output findings.jsonfor automation payloads. - Control CI failure behavior with
--fail-on error|warning; defaults toerror.
Common commands
| Purpose | Command |
|---|---|
| Install for development | pip install -e .[dev] |
| Run unit tests | pytest |
| Scan current directory | dbt-tester run . --format console |
| Export HTML report | dbt-tester run . --format html --output dbt_report.html |
| Export JSON report | dbt-tester run . --format json --output dbt_report.json |
| Enforce zero warnings in CI | dbt-tester run . --fail-on warning |
Development
python -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
pytest
To ship the package:
python -m build
twine upload dist/*
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dbt_tester-0.1.0.tar.gz.
File metadata
- Download URL: dbt_tester-0.1.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
301f84bb7df27aab8578a426376e63b3c92e28bf20f608bb7fcc4cefa936bc05
|
|
| MD5 |
0b4f55c474368b00fe2c3f46c5a3c235
|
|
| BLAKE2b-256 |
446c4d9fd5c4987f1d0e369b22d1b7b9ce1ecc39d417f941ff6517f61fa849b9
|
File details
Details for the file dbt_tester-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dbt_tester-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cff8e3964f54e66fede2f4a35fcc5277843ba212fc1893fc910858948d17410
|
|
| MD5 |
99ce44c29460a97ebbb4bce3a5d9111e
|
|
| BLAKE2b-256 |
7523904109c9714abad9982ca465353fe1b574b496ecd4e15489058012685953
|