Introducing Data Lineage in DBML

We’re excited to announce that dbdiagram and DBML now support visualizing data lineage: how your data moves and transforms across tables.

You define dependencies with the new Dep syntax:

// one line per step
Dep: stripe_payments -> daily_orders [note: 'Cleaning: drops voided charges']

// or map the columns, and pull several tables into one
Dep monthly_revenue_build {
  daily_orders.amount -> monthly_revenue.revenue
  daily_orders.ordered_at -> monthly_revenue.month
  refunds.amount -> monthly_revenue.refunds

  note: 'Aggregation: orders by month, minus refunds.'
}

Why it matters:

  • Design before you build. One line per step is enough to sketch a whole pipeline in plain text, and get review on its shape before any SQL exists.
  • Answer “where does this number come from”. Map single columns, then click one in the diagram and every table it travelled through lights up.
  • Schema and flow on one canvas. Ref and Dep draw as different edge styles, so you can show them together or separately, whichever the diagram needs.
  • Notes explain what each step does. Add a note to any dependency to describe the step in plain words, so the meaning sits beside the arrow instead of in a separate doc.

Reading lineage straight from a dbt project or your warehouse is what we are working on next.

Note: Data lineage is available on all plans, with no limit on project size.

:books: Read the full syntax docs →

Please give this feature a try and let us know what you think.
From dbx team with :heart:

1 Like

https://community.dbdiagram.io/t/the-missing-part-in-lineage-dependency/5956

1 Like

Hi, is it normal to receive a Syntax error when publishing from dbdiagram to dbdocs when I included dependencies in my code?

@MLOB Hi, dbdocs hasn’t supported data deps syntax yet. We plan to support it by the end of this week or start of next week. Thank you for your patience and sorry for the inconvenience!