hands-on lab

Create and Execute Your First dbt Models

Difficulty: Beginner
Duration: Up to 1 hour
Students: 238
Rating: 5/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Models are the core components of dbt. dbt models are the materialization of the data modeling and transformations you want to apply to data. So, dbt designed them in a simple way to let data engineers be able to work on them with no headaches.

When working with models, you can start modeling data from sources, or you can start transforming data available in other dbt models you have already defined. To let dbt understand which data start from, you use the ref and source macros. 

When applying transformations to your data, you may want to define multiple steps of transformations, and you may want some transformations to be materialized in a different way than others. Because of that, dbt allows you to materialize models in different ways such as views, tables, and with no materialization (ephemeral). The last one means that the model you are building is only available when dbt is executing, so no data is persisted on the database.

Learning Objectives

Upon completion of this lab, you will be able to:

  • Understand how to work with dbt models
  • Create and execute dbt models leveraging sources and other models

Intended Audience

  • Data engineers with a focus on data modeling and transformations methodologies
  • Developers who need a powerful tool to get insights from raw data

Prerequisites

To get the most from this lab, you should have basic knowledge of dbt. To get ready, you can use the following labs:

Covered topics

Lab steps

Connecting to the dbt Web IDE
Create a dbt Model Based on Sources
Create a dbt Model Based on Existing Model
Building the dbt Models