Working With Full-Refresh dbt Models
Lab Steps
The hands-on lab is part of this learning path
Ready for the real environment experience?
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:
Stefano studies Computer Science and is passionate about technology. He loves working with Cloud services and learning all the best practices for them. Google Cloud Platform and Amazon Web Services are the cloud providers he prefers. He is a Google Cloud Certified Associate Cloud Engineer. Node.js is the programming language he always uses to code. When he's not involved in studying or working, Stefano loves riding his motorbike and exploring new places.