Documentation
Learn how to create and host a documentation website.
Overview of documentation
dbt provides the option to render documentation as a website.
Press + to interact
The website includes useful features, such as compiled SQL:
Press + to interact
We can also give dbt descriptions for our models and tables:
Press + to interact
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.
Press + to interact
version: 2models:- name: ordersdescription: This table contains orders.columns:- name: order_iddescription: This is the unique identifier of an order.- name: customer_iddescription: This is the unique identifier of a customer.- name: customerscolumns:- name: product_iddescription: This is the unique identifier of a product.- name: order_statusdescription: The current status of an order.
Here, we set up a ...