dbt-score
raw JSON → 0.16.0 verified Fri May 01 auth: no python
A linter for dbt metadata. It evaluates your dbt project against a set of rules (e.g., naming conventions, documentation coverage, test coverage) and produces a score. Currently at version 0.16.0, requires Python >=3.10.
pip install dbt-score Common errors
error ModuleNotFoundError: No module named 'dbt_score' ↓
cause dbt-score is not installed in the current environment.
fix
Run
pip install dbt-score. error dbt_score.exceptions.ProjectNotFoundError: Could not find dbt_project.yml ↓
cause The current directory does not contain a dbt project.
fix
Navigate to the root of your dbt project (where dbt_project.yml resides).
error dbt_score.exceptions.ProfileNotFoundError: Could not find profiles.yml ↓
cause No dbt profiles.yml is present (default location ~/.dbt/profiles.yml).
fix
Create a valid profiles.yml in ~/.dbt/ or set the DBT_PROFILES_DIR environment variable.
error TypeError: evaluate() got an unexpected keyword argument 'output_format' ↓
cause The old `output_format` parameter was renamed to `format` in v0.16.
fix
Use
format='json' instead of output_format='json'. Warnings
breaking dbt-score 0.16.0 removed the `--output-format` CLI flag in favor of `--format`. All scripts using the old flag will break. ↓
fix Replace `--output-format json` with `--format json`.
breaking The `RulesRegistry` API changed from a class to a module-level factory function in v0.14. ↓
fix Use `from dbt_score.rules_registry import create_registry` instead of `RulesRegistry()`.
deprecated The `dbt_score.models` module is deprecated. Rules should now import `dbt_score.models.Model` directly. ↓
fix Change `from dbt_score.models import Model` to `from dbt_score import Model`.
gotcha dbt-score only works with dbt Core (not dbt Cloud). Attempting to use it with a Cloud-only dbt project will fail. ↓
fix Ensure the project is built with dbt Core and a local profiles.yml.
Imports
- evaluate wrong
from dbt_score.evaluator import evaluatecorrectfrom dbt_score import evaluate - Rule wrong
from dbt_score.rules import Rulecorrectfrom dbt_score import Rule - rule wrong
from dbt_score.decorators import rulecorrectfrom dbt_score import rule
Quickstart
from dbt_score import evaluate
# Run evaluation on a dbt project (assumes dbt_project.yml in current dir)
results = evaluate()
print(results)