0
0
dbtdata~30 mins

Why dbt transformed data transformation workflows - See It in Action

Choose your learning style9 modes available
Why dbt Transformed Data Transformation Workflows
📖 Scenario: Imagine you work in a company where data is collected from many sources. Before you can analyze it, you need to clean and organize it. This process is called data transformation. Traditionally, this was slow and hard to manage. Then, a tool called dbt changed how teams transform data.
🎯 Goal: You will create a simple example to understand how dbt helps transform data step-by-step, making workflows easier and clearer.
📋 What You'll Learn
Create a dictionary with raw data representing sales
Add a configuration variable to set a sales threshold
Use a comprehension to filter sales above the threshold
Print the filtered sales data
💡 Why This Matters
🌍 Real World
Companies collect data from many places. They need to clean and organize it before making decisions. dbt helps teams write clear, reusable steps to transform data quickly and safely.
💼 Career
Data analysts and engineers use dbt to build reliable data pipelines. Understanding how to filter and transform data is a key skill for these roles.
Progress0 / 4 steps
1
Create raw sales data dictionary
Create a dictionary called raw_sales with these exact entries: 'store1': 100, 'store2': 250, 'store3': 75, 'store4': 300
dbt
Need a hint?

Use curly braces to create a dictionary and separate each store and sales value with a colon.

2
Set sales threshold configuration
Create a variable called sales_threshold and set it to 150
dbt
Need a hint?

Just assign the number 150 to the variable sales_threshold.

3
Filter sales above threshold using comprehension
Create a new dictionary called filtered_sales using a dictionary comprehension that includes only items from raw_sales where the sales value is greater than sales_threshold
dbt
Need a hint?

Use a dictionary comprehension with for store, sales in raw_sales.items() and an if condition.

4
Print the filtered sales data
Write a print statement to display the filtered_sales dictionary
dbt
Need a hint?

Use print(filtered_sales) to show the result.