Upstream

See where every column in your warehouse comes from.

Paste your SQL or dbt models. Upstream reads them, traces each column back to the raw tables it was built from, follows personal data from source to dashboard, and shows what breaks before you drop or rename anything. Nothing leaves your browser.

Comes fromFeeds intoWould breakPersonal dataHashedOnly in totals

Example projects to try

Drag one onto the page, or click Open it here. Each one replaces what’s loaded now, and you can always get the store sample back with Load the sample. Download them to see the file format.

Health checks

Governance problems Upstream can see from the SQL alone: personal data in the wrong place, data loaded but never used, fragile SELECT *, broken references and leftover models. Click any finding to jump to it.

Where personal data ends up

Every column in a final model (one nothing else reads from) that still carries personal data, with the raw columns it came from. These are the tables to check before they're shared with a vendor, a dashboard or an AI tool.

How it works

Upstream is a small SQL compiler written for this page. It doesn't run your queries. It reads them the way a database planner would, then follows every column reference through CTEs, subqueries, joins and unions until it reaches a raw table.

1. Read the models

Plain SQL or dbt. {{ ref() }} and {{ source() }} become real table links, and other Jinja is skipped. Models are ordered so each one is read after the models it depends on, and loops are flagged.

2. Resolve every column

Aliases, SELECT * (including EXCLUDE and EXCEPT), USING joins, Snowflake-style references to an earlier alias in the same SELECT, casts, window functions and nested CTEs are all followed. Ambiguous or unknown columns are listed as warnings instead of guessed silently.

3. Follow personal data

Raw columns that look personal (email, phone, names, birth dates, addresses, IP addresses, card numbers) are tagged, and the tag follows the data downstream. Hashing marks it as masked, and COUNT or SUM mark it as only in totals. MIN, MAX and ANY_VALUE keep it, because they return real values.

=
Passed through unchanged.
as
Same value, new name.
fx
Calculated from one or more columns.
#
Hashed or masked.
Σ
Aggregated (SUM, COUNT, MAX and so on).
win
Window function (ROW_NUMBER, LAG, running totals).
k
A constant that doesn't depend on any column.

Review a change first

Edit a model and Upstream compares your draft to what’s there now before anything is saved: columns removed or added, what breaks downstream, and any personal data that becomes readable. Apply it or throw it away.

Bring a real dbt project

Run dbt compile and upload target/manifest.json. Upstream reads the compiled SQL of every model, so macros are already expanded, plus any columns documented on your sources.

Share what you found

Every column and model has its own link. Copy it from the side panel to point a teammate straight at it. Your project stays in your browser, so the link opens the same view on any device that has the same project, like the sample.

Which rows end up in a model also depends on its WHERE, JOIN and GROUP BY columns. Upstream lists those separately on each model, because they change the data without appearing in it.

Paste your models

Start each model with a line like -- model: stg_orders. A single query without a header works too. You can add raw table columns under -- sources, one table per line: raw.orders: id, customer_id, total.