Creating your first model
📖 Scenario: You are working as a data analyst at a retail company. You want to create a simple dbt model that selects customer data from a source table and prepares it for analysis.
🎯 Goal: Build a basic dbt model that selects customer names and their total purchase amounts from the source table raw.customers.
📋 What You'll Learn
Create a dbt model SQL file named
customer_purchases.sqlSelect the columns
customer_id, customer_name, and total_purchases from raw.customersFilter to include only customers with
total_purchases greater than 100Order the results by
total_purchases in descending order💡 Why This Matters
🌍 Real World
Creating dbt models helps organize and transform raw data into clean, usable datasets for business analysis.
💼 Career
Data analysts and engineers use dbt models to build reliable data pipelines and prepare data for reporting and machine learning.
Progress0 / 4 steps