When it comes to documentation, dbt brings together both column and model level descriptions that you can provide as well as details from your Snowflake information schema in a static site for consumption by other data team members and stakeholders.
We are going to revisit 2 areas of our project to understand our documentation:
To start, let’s look back at our
intermediate.md file. We can see that we provided multi-line descriptions for the models in our intermediate models using docs blocks. Then we reference these docs blocks in our
.yml file. Building descriptions with doc blocks in Markdown files gives you the ability to format your descriptions with Markdown and are particularly helpful when building long descriptions, either at the column or model level. In our
dbt_project.yml, we added
node_colors at folder levels.
To see all these pieces come together, execute this in the command bar:
dbt docs generate
This will generate the documentation for your project. Click the book button, as shown in the screenshot below to access the docs.dbt docs book icon
Go to our project area and viewDocblock description within docs site
int_results. View the description that we created in our doc block.
View the mini-lineage that looks at the model we are currently selected on (Mini lineage view on docs site
int_resultsin this case).
In ourFull project DAG on docs site
dbt_project.yml, we configured
node_colorsdepending on the file directory. Starting in dbt v1.3, we can see how our lineage in our docs looks. By color coding your project, it can help you cluster together similar models or steps and more easily troubleshoot.