dbt docs serve helps you see your data project's structure and details in a simple web page. It makes understanding your data models and their relationships easy.
0
0
dbt docs serve
Introduction
You want to explore your data models visually after building them.
You need to share your data project documentation with your team.
You want to check the lineage and dependencies between tables.
You want to quickly find descriptions and tests for your data models.
You want to review your project documentation locally before sharing.
Syntax
dbt
dbt docs serve
This command starts a local web server to show your project docs.
Run it after you have generated your docs with dbt docs generate.
Examples
Starts the documentation server on the default port (usually 8080).
dbt
dbt docs serve
Starts the documentation server on port 9090 instead of the default.
dbt
dbt docs serve --port 9090Sample Program
First, we generate the documentation files. Then, we run dbt docs serve to start a local web server. You can open the shown URL in your browser to explore your data models and their relationships.
dbt
# Step 1: Generate docs for your dbt project !dbt docs generate # Step 2: Serve the docs locally !dbt docs serve # This will open a local web page showing your project documentation.
OutputSuccess
Important Notes
You must run dbt docs generate before serving docs, or the docs will be empty.
The docs server runs locally and is not public unless you share your computer or network.
Press Ctrl+C in the terminal to stop the docs server.
Summary
dbt docs serve shows your data project docs in a web browser.
It helps you understand your data models and their connections easily.
Run it after building your project to see up-to-date documentation.