PowerUser Plugin for dbt

Ask Altimate Code About a dbt Model Straight from the Lineage Graph

Open the Lineage tab, pick a dbt model, and ask Altimate Code what it depends on, what depends on it and how any one column is calculated.

Ask Altimate Code about a dbt model straight from the lineage graph
TL;DR
  • What it is. An Ask Altimate Code menu on every node of the Lineage tab, plus a Relationships overlay. Model lineage is free. Column-level lineage needs a free Altimate API key.
  • Who it is for. Analytics engineers who inherit a dbt project whose lineage graph is too big to read by eye.
  • What you get. A written dependency tree, the logic behind any column and the keys that join your models, inside VS Code or Cursor.

In a small dbt project you read lineage by eye. In an enterprise project one model can sit on dozens of upstream models. At that size the graph stops answering the question you opened it for. Before you change a model, you still need three answers. What does it do, what does it read and what reads it?

Enable Relationships to See How Models Join

Click Relationships in the Lineage toolbar and choose where it may look for keys. It can read four sources:

  • Declared from tests, such as a relationships test in your YAML.
  • Model contracts that name a primary or foreign key.
  • Semantic entities in your semantic models.
  • Column names, such as order_id in two models.

In the demo it marks stg_orders.order_id as a foreign key to orders.order_id, inferred from naming.

The Lineage tab for orders.sql with the Relationships overlay open. Checkboxes read Declared from tests (1), From model contracts (0), From semantic entities (0) and Inferred from naming (3), and a dashed line joins stg_orders.order_id, tagged FK, to orders.order_id, tagged PK.

A dashed line marks each key. You see how two models join before you open either file. Do your column names follow no convention? Clear the naming source, so only declared keys show. The lineage guide covers the rest of the graph controls.

Ask Altimate Code What a Model Depends On

Every model node carries an Ask Altimate Code menu with prompts already written. You can ask for a summary, the upstream models, the downstream models or the data quality risks and missing tests. Pick one and an Altimate Code chat opens with the prompt filled in.

The Ask Altimate Code menu on the orders node, listing Summarize what this model does, What are the upstream dependencies of this model, What downstream models depend on this one, Are there data quality risks or missing tests here, and Ask something else.

On the orders model the answer is a tree. The orders model reads stg_orders and stg_payments. Each staging model reads one seed. A lineage table under the tree lists each model's type, materialization and role. The answer names your real files, such as models/staging/stg_orders.sql. You can paste it straight into a pull request description.

The Chat: orders tab titled Upstream dependencies of orders dbt model. A tree shows orders reading stg_orders and stg_payments, which read the seeds raw_orders and raw_payments, and a Lineage detail table lists model, type, materialization, depends on and role.

Spotlight 2 video, dbt column-level lineage and model chat in VS Code and Cursor

Ask How a Single Column Is Calculated

Click a column, open Details, and the same chat offers prompts for that column. Asked how bank_transfer_amount is calculated, Altimate Code returns the SQL transformation behind it. That answer used to mean reading every upstream file by hand. Use it on a column a stakeholder questions, before you touch the SQL that produces it.

To show a graph to someone who does not use VS Code, click Export. The PowerUser Plugin for dbt creates a link in your Altimate instance, under Collab and then Export Lineage. Before you change the model you just read, profile its query for bugs and cost.

Install the dbt VS Code extension

Frequently Asked Questions

Install the dbt VS Code Extension. Free to Start.

Power User for dbt is an open source VS Code extension that adds column lineage, autocomplete, AI docs, query previews and health checks to your dbt project.

The Altimate platform: team spend by warehouse, dbt column lineage and an Altimate Code session recap