hands-on lab

Configure a dbt Profile and Define Sources

Difficulty: Beginner
Duration: Up to 40 minutes
Students: 270
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

dbt allows you to model and transform data by representing transformation through SQL queries. To retrieve the data, dbt impersonates a profile. It represents the parameters used to connect to a specific database such as username, password, database type, and schema to point. When working with dbt, you could fall into the situation where data needs to be retrieved from multiple sources. dbt supports this scenario and lets you define more than one profile.

After a profile is created, dbt needs to know what are the sources (the tables in the database) to start the transformations from. In order to do so, you need to define dbt sources. All the dbt sources need to be mapped by specifying the schema and the table the source represents. If you don't map a source, dbt doesn't have visibility on it, so you can't use it as a starting point for your transformations.

In this lab, you will configure a dbt profile that points to a PostgreSQL database hosted in your lab environment, and you will define some sources based on tables available in the PostgreSQL database.

Learning Objectives

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

  • Configure a dbt profile to point to a PostgreSQL database
  • Define sources in order to let dbt view and use them

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
Configuring a dbt Profile
Defining dbt Sources