Best Practices for Organizing dbt Models
Description
If you are using dbt and working with a new or existing project, having a guideline to follow in order to create and organize your models is very important. This is crucial if your dbt project becomes bigger and bigger. In this scenario, having a weak project's structure could cause your project to become very hard to understand and work on.
When working with dbt models, you should know three main model types: staging (also named base), intermediate, and marts. In a small dbt project, you could not hear about intermediate models because few intermediate transformations and modeling need to be performed.
In this lab, you will understand what the three model types mentioned above mean, you will then create some dbt models and organize them following the best practices. You will finally build the dbt project to get the models built.
Learning Objectives
Upon completion of this lab, you will be able to:
- Understand the main dbt model types
- Organize dbt models following best practices
Intended Audience
- Data analysts that need to organize a dbt project in a clear way
- Developers that need to work on existing dbt projects
Prerequisites
To get the most from this lab, you should have basic knowledge of dbt. To get ready, you can use the following labs:
- Create Your First dbt (Data Build Tool) Project
- Configure a dbt Profile and Define Sources
- Create and Execute Your First dbt Models
- Working With Full-Refresh dbt Models
- Working With Incremental dbt Models
- Working With Ephemeral dbt Models
- Understand and Use dbt Jinja Macros
- Understand and Work With dbt Seeds
- Defining and Working With dbt Tests