0
0
dbtdata~15 mins

dbt docs serve - Mini Project: Build & Apply

Choose your learning style9 modes available
Serving dbt Documentation Locally
📖 Scenario: You are working on a data analytics project using dbt (data build tool). You want to generate and serve the project documentation locally so you can explore your data models and their relationships in a web browser.
🎯 Goal: Learn how to use the dbt docs serve command to generate and serve your dbt project documentation locally.
📋 What You'll Learn
Have a dbt project initialized with some models
Have dbt installed and configured
Use the dbt docs serve command to serve documentation
💡 Why This Matters
🌍 Real World
Data analysts and engineers use dbt docs serve to quickly view and understand their data models and lineage during development.
💼 Career
Knowing how to generate and serve dbt documentation is essential for data professionals working with dbt to maintain clear, accessible data pipelines.
Progress0 / 4 steps
1
Generate dbt Documentation
Run the command dbt docs generate in your terminal to create the documentation files for your dbt project.
dbt
Need a hint?

This command creates the documentation files needed to serve your dbt docs.

2
Serve the Documentation Locally
Run the command dbt docs serve in your terminal to start a local web server that hosts your dbt documentation.
dbt
Need a hint?

This command starts a local server and opens your default browser to view the docs.

3
Access the Documentation in Browser
After running dbt docs serve, open your web browser and go to http://localhost:8080 to view your dbt project documentation.
dbt
Need a hint?

The documentation is served on port 8080 by default.

4
Confirm Documentation is Served
Print the message 'Documentation is now served at http://localhost:8080' to confirm that the dbt docs are available locally.
dbt
Need a hint?

This message confirms your docs are ready to explore.