sqb dbt lineage traces dependencies across the combined dbt and SQLBuild graph:
- Point it at a column (
resource:column) to trace where that column’s values come from, or go, through every intermediate model. - Point it at a model (no colon) for the model-level dependency graph.
Column lineage
Target a column withresource:column (a colon between the model and the column):
direct, aggregation, expression, …), and the trace follows the column all the way back to the source - here through four models down to a seed. It also crosses the dbt/SQLBuild boundary: a SQLBuild column that reads a dbt model via __dbt_ref traces straight into the dbt model’s columns. See Column lineage for the full list of transform types and confidence levels.
Use --direction downstream to trace the other way - every column derived from this one:
--direction upstream (default) or downstream, but not both - the same restriction as the native sqb lineage command.
The dbt column target uses a colon (
model:column); the native sqb lineage command uses a dot (model.column). The colon is used here because dbt model and package references already contain dots.Model lineage
Target a model (no colon) for the model-level dependency graph:[dbt] / [sqb] tag on each node shows whether it is a dbt or SQLBuild resource. --direction both shows upstream and downstream together:
Options
The
list and json formats keep fully-qualified resource names (e.g. model.jaffle_analytics.fct_orders) for unambiguous scripting; the tree format shortens them for readability.
See Selection for how dbt and SQLBuild resources are named in the combined graph.
