What Is the dbt DAG?

Last updated July 25, 2026 · By the SaturnSQL team

The DAG (directed acyclic graph) is dbt's dependency graph of sources, models, seeds, and snapshots. Every {{ ref() }} and {{ source() }} call adds an edge, which is how dbt knows the correct build order and enables parallel execution across threads.

Refs define the edges

-- fct_orders depends on stg_orders and stg_customers
SELECT ...
FROM {{ ref('stg_orders') }} o
JOIN {{ ref('stg_customers') }} c ON ...

Viewing the lineage graph

dbt docs generate
dbt docs serve   # open the graph icon, bottom right

Graph selectors traverse the DAG on the command line: +model selects upstream nodes, model+ downstream. dbt errors on cycles, since the graph must stay acyclic.

Run this in SaturnSQL

SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.

Try it free

Related dbt guides

© 2026 Panda Capital Oy Ab. All rights reserved.