Building a DAG of models
📖 Scenario: You work in a company that uses dbt to organize data transformations. You want to build a simple Directed Acyclic Graph (DAG) of models where one model depends on another. This helps keep your data organized and updated in the right order.
🎯 Goal: Create two dbt models where the second model depends on the first. This will build a DAG of models showing how data flows from one step to the next.
📋 What You'll Learn
Create a base model with a simple SQL SELECT statement
Create a second model that selects from the first model using the ref() function
Use the ref() function to define dependencies between models
Run the models to see the DAG in action
💡 Why This Matters
🌍 Real World
In real companies, dbt helps organize complex data transformations by building DAGs of models. This keeps data pipelines clear and maintainable.
💼 Career
Data engineers and analysts use dbt to build reliable data workflows. Knowing how to build DAGs is essential for managing dependencies and ensuring data quality.
Progress0 / 4 steps