dbt docs generate builds a static website with lineage graphs, model metadata, and tests based on your compiled dbt project.
dbt docs generate is a CLI command that compiles your project metadata into a searchable static site, letting teams explore lineage, columns, and tests without opening code.
Accurate, always-up-to-date documentation reduces onboarding time, surfaces broken contracts early, and satisfies data governance requirements.
The command parses your manifest.json, catalog.json, and run results, then writes HTML, JS, and JSON assets to a target directory.
It uses manifest.json for DAG and metadata, catalog.json for column stats, and run_results.json for test outcomes.
Navigate to your project root and run the command in the same environment used for dbt run.
dbt docs generate
This builds docs in target
by default.
dbt docs generate --profiles-dir ~/.dbt --target prod --output-dir ./public_docs
Override where metadata is read and where HTML is written.
Use dbt docs serve
for a localhost preview, then upload contents of the output directory to S3, GCS, GitHub Pages, or Vercel.
# activate venv and set creds
source venv/bin/activate
export SNOWFLAKE_ROLE=TRANSFORMER
dbt run --target prod
dbt docs generate --target prod
Open target/index.html
to explore lineage and tests.
Schedule docs generation after each production run, version docs per git tag, and enforce column descriptions via CI tests.
Missing catalog.json often means dbt run was skipped; rerun models or pass --full-refresh
to rebuild stats.
Galaxy links directly from query results to the corresponding model in your generated docs, letting engineers jump from SQL to lineage in one click.
dbt docs generate produces shareable, self-service documentation that boosts team velocity and trust in data models.
Up-to-date documentation prevents knowledge silos. By automatically generating a browsable site, teams reduce onboarding time, debug lineage breaks faster, and satisfy governance audits. Automated docs also free engineers from manual wiki edits, ensuring accuracy aligns with the codebase.
Run dbt docs serve
and open the provided URL, usually http://localhost:8080
.
Yes. In CI/CD, run dbt run
➔ dbt docs generate
➔ sync target
to S3 or push to GitHub Pages.
This happens when the manifest is missing nodes. Ensure model
and source
files were parsed successfully and no syntax errors exist.
Galaxy can embed the generated site in a side panel, letting you click from a query to its model docs without leaving the SQL editor.