From the course: Data Engineering with dbt
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
The docs_blocks.md file - Data Build Tool (dbt) Tutorial
From the course: Data Engineering with dbt
The docs_blocks.md file
- [Instructor] Now, I'm going to introduce you to doc blocks. Doc blocks are essentially creating variables that you can pass along your DBT project documentation. And I'll quickly show you what that looks like. So I'll create a new text file, and here's a great way to think about them. If you're familiar with Python, you know you can create a variable and assign it a value such as a string. That's a similar thing happening here. With doc blocks we're using a ginga, again called docs, where we set the name as example name and then we add the text, this is example text, and then we end it here. And now we can pass this variable throughout our project. So, let's create our doc blocks file, make sure we're in the right directory. Touch models docs docs blocks.md. And dot md stands for markdown and that's what DBT uses to understand. So let's do a quick doc block for our violation code. Add it right here, copy and paste. So…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.