ref() and the DAG

Instead of hard-coding table names like "raw.customers", dbt models reference other models with {{ ref('model_name') }}. dbt parses every ref() to build the DAG — a directed graph of model dependencies — and runs models in the correct order automatically.

In this lesson you will replace a hard-coded table name with ref(), then watch the DAG update in the lineage panel and verify dbt now runs your models in topological order.

Loading the interactive tutorial… If this message stays, please enable JavaScript.