Search⌘ K
AI Features

Documentation

Explore how to create and manage documentation for your dbt projects by generating a documentation website, adding descriptions to models and columns, and persisting these in your data warehouse like BigQuery. This lesson helps you understand the setup process using property files and CLI commands to improve data transparency and collaboration.

Overview of documentation

dbt provides the option to render documentation as a website.

Documentation home page
Documentation home page

The website includes useful features, such as compiled SQL:

Documentation of a model's code
Documentation of a model's code

We can also give dbt descriptions for our models and tables:

Documentation of a model's columns
Documentation of a model's columns

How to set up documentation

To set up documentation, we need to create some property files and run a series of commands to host our website.

Property files

When setting up documentation, it’s recommended to set up some descriptions in a property file.

YAML
version: 2
models:
- name: orders
description: This table contains orders.
columns:
- name: order_id
description: This is the unique identifier of an order.
- name: customer_id
description: This is the unique identifier of a customer.
- name: customers
columns:
- name: product_id
description: This is the unique identifier of a product.
- name: order_status
description: The current status of an order.

Here, we set up a description for all of our models and their ...