{"id":21110,"library":"dbt-coverage","title":"dbt-coverage","description":"One-stop-shop for docs and test coverage of dbt projects. v0.4.1 supports dbt up to 1.9, with commands to measure column documentation, test, and model coverage, and compare coverage reports. Frequent patch releases.","status":"active","version":"0.4.1","language":"python","source_language":"en","source_url":"https://github.com/slidoapp/dbt-coverage","tags":["dbt","coverage","testing","documentation"],"install":[{"cmd":"pip install dbt-coverage","lang":"bash","label":"pip"}],"dependencies":[{"reason":"Required to parse dbt manifest and catalog","package":"dbt-core","optional":false}],"imports":[{"note":"CoverageReport is exposed at package level, not in a submodule.","wrong":"from dbt_coverage.report import CoverageReport","symbol":"CoverageReport","correct":"from dbt_coverage import CoverageReport"},{"note":"No standalone function; instantiate CoverageReport and call .report()","wrong":"from dbt_coverage import get_coverage_report","symbol":"get_coverage_report","correct":"from dbt_coverage import CoverageReport"}],"quickstart":{"code":"from dbt_coverage import CoverageReport\nimport json\n\n# Point to a dbt project with compiled manifest and catalog\nreport = CoverageReport(\n    manifest_json='target/manifest.json',\n    catalog_json='target/catalog.json'\n)\nresult = report.report()\nprint(json.dumps(result, indent=2))","lang":"python","description":"Generate a coverage report from compiled dbt manifest and catalog."},"warnings":[{"fix":"Review test coverage numbers after upgrade; adjust thresholds if needed.","message":"v0.4.0 changed how test hits are counted (feat!(test): count number of hits). Existing workflows expecting the old test counting may see different totals.","severity":"breaking","affected_versions":">=0.4.0,<0.4.1"},{"fix":"Run `dbt docs generate` or `dbt compile` and `dbt docs generate` before using dbt-coverage.","message":"manifest and catalog must be compiled before running CoverageReport. Running from a fresh dbt project without `dbt docs generate` will cause errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to >=0.3.3.","message":"When using model aliases, the coverage nodes may be incorrectly matched. Fixed in v0.3.3, but still possible with unconventional alias usage.","severity":"gotcha","affected_versions":"<0.3.3"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"pip install dbt-coverage","cause":"dbt-coverage not installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'dbt_coverage'"},{"fix":"Ensure you run `dbt docs generate` and point to the correct manifest.json (e.g., target/manifest.json).","cause":"The manifest JSON file is missing the 'nodes' key, likely an old dbt or incorrect file path.","error":"KeyError: 'nodes'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}