sqb compile computes lineage for validation and includes per-model summaries in its JSON report. Use this command when you need to inspect or export the actual lineage graph.
Usage
--select is required.
Flags
Model lineage
When the target is a plain resource name, lineage shows the model-level dependency graph.Tree
The default. Shows an indented dependency tree with resource types and file paths:List
An edge list showing each dependency as a directed pair:JSON
Structured output with nodes, edges, and metadata:Column lineage
When the target usesmodel.column syntax, lineage traces the specific column through upstream or downstream transformations. Each edge is annotated with a transform type (direct, expression, aggregation, cast, star, constant) and a confidence level. See Column Lineage for a full explanation of transform types, confidence levels, and analysis modes.
upstream and downstream directions (not both). The --mode flag selects the analysis mode: rich (default, full SQL analysis) or fast (lightweight, faster on large projects).
Tree
List
JSON
Examples
Depth limiting
--depth controls how many hops from the focus node(s) to include. In selector mode, --depth requires name, source, seed, or path-between selectors - it cannot be combined with tag or path selectors or comma-intersection selectors.

