Skip to main content

sqb dag

Compiles the project and outputs the static DAG artifact. The artifact contains every node (source, seed, model, function), dependency edge, and check (test, audit, scenario) in your project as structured JSON. It is the bridge between SQLBuild and external orchestrators like Dagster. This artifact describes resource dependencies, not column-level lineage. Use sqb lineage to inspect or export column traces.

Usage

Flags

Without --json, the command prints a summary:

Generating via compile

You can also generate the DAG artifact as part of a compile:
This is useful when you want to compile and generate the DAG in one step. The SqlBuildProject.prepare() method in the Dagster integration uses this path.

Output format

The JSON artifact has this structure:

Nodes

Each node represents a source, seed, model, or function:

Edges

Each edge is a dependency between two nodes:

Checks

Each check represents a test, audit, or scenario:

Examples