0
0
dbtdata~20 mins

What is dbt - Hands-On Activity

Choose your learning style9 modes available
What is dbt
📖 Scenario: Imagine you work in a team that manages data for a company. You want to make sure the data is clean, organized, and easy to use for reports and analysis.
🎯 Goal: Learn what dbt is and how it helps transform raw data into useful information by writing simple code.
📋 What You'll Learn
Understand the basic purpose of dbt
Create a simple dbt model file
Configure a dbt project variable
Write a SQL select statement inside a dbt model
Display the transformed data output
💡 Why This Matters
🌍 Real World
Companies use dbt to automate and document their data transformations, making data reliable and easy to analyze.
💼 Career
Data analysts and engineers use dbt to build and maintain data pipelines that power business decisions.
Progress0 / 4 steps
1
Create a simple dbt model file
Create a dbt model file named my_first_model.sql with a SQL query that selects all columns from a table called raw_data.
dbt
Need a hint?

dbt models are just SQL files with select statements.

2
Add a configuration variable
In the same my_first_model.sql file, add a dbt config block at the top to set materialized='table'.
dbt
Need a hint?

Use {{ config(materialized='table') }} at the top of your model file.

3
Write core transformation logic
Modify the SQL query in my_first_model.sql to select only the id and value columns from raw_data where value is greater than 10.
dbt
Need a hint?

Use a where clause to filter rows.

4
Display the transformed data output
Print the final SQL query from my_first_model.sql to show the transformed data selection.
dbt
Need a hint?

Use a print statement to show the SQL code.