Working With Full-Refresh dbt Models
Description
When you need to define new models, everyone has different behavior and data exposed. There are models containing data that represent events and records that can't change once they are created (ex. A model that contains bank transactions records), but there are also models that could contain records that can change (ex. A model that contains information about a user).
Because of that, dbt allows you to leverage different types of materialization for your dbt models. By using the table materialization type, you define full-refresh models. It means that every time a dbt execution is performed, the table is created if not exist, or truncated, and then populated again. So, all the records are fresh.
In this lab, you will create two dbt models using the table materialization type, and you will check that on each execution the table is truncated and then populated again with fresh records.
Learning Objectives
Upon completion of this lab, you will be able to:
- Understand what are full-refresh models
- Work and create full-refresh dbt models
Intended Audience
- Data engineers with a focus on data modeling and transformations methodologies
- Developers that need to understand different kinds of dbt materialization techniques
Prerequisites
To get the most from this lab, you should have basic knowledge of dbt. To get ready, you can use the following labs: