Upstream reads the SQL behind your data and draws a map of where every column comes from and where it goes. This page explains what that's good for, what each part of the screen does, and then walks through the four things people use it for most.
Upstream answers two questions about any number or field in your data: where did this come from, and what else depends on it?
The queries that build your tables. Plain SQL works, and so does a dbt project, the most common way teams organize this kind of SQL.
It follows each column through renames, calculations, joins and totals, all the way back to the raw table it started in.
A picture of how your data flows, a list of where personal data ends up, and a heads-up before a change breaks something.
The idea behind it is called data lineage: knowing the family tree of every piece of data. Big companies pay for tools that do this. Here's what it looks like in real situations.
Finance says the dashboard's revenue is lower than their spreadsheet. You click revenue in the daily revenue table and see it's built from line totals that already have discounts taken off. Mystery solved in a minute.
An audit asks every place an email address is stored or shared. The personal data report lists every final table still showing it, plus which raw column it came from, ready to download.
A raw table has a column nobody seems to use. Before removing it, you preview dropping it. If nothing turns red, it's safe. If three dashboards light up, you know who to warn.
First week on a client's data warehouse. You upload their dbt project and read the health checks: personal data in the wrong places, models nobody uses, risky SELECT *. That's your first-week findings deck.
manifest.json, read Health checks.A teammate wants to hash emails in a staging model. You paste their version in and review it: it would break two columns downstream, so they need to update those too before it ships.
Paste a long query full of CTEs and joins. The map shows which columns feed which, and the side panel highlights the exact line in the SQL that makes each one.
The guided tour points at each of these on the real page. Here they are in order, top to bottom.
Paste your models, Upload files (SQL files, a dbt sources.yml or manifest.json) and Load the sample. Next to them: search, Focus on selection and Personal data only, plus quick counts and the health score.
Every table, grouped into layers: source raw tables, staging cleaned up, intermediate combined, and mart what people actually read. A magenta dot means personal data, yellow means a warning, and red means an error.
One card per table and one row per column. Data flows left to right. Click a column to trace it, or click a card's name to see the whole table. Drag the background to move around, and use + / − / Fit to zoom.
Everything about what you clicked: what kind of data it is, how it was made, every step from the raw table, the highlighted line in the SQL, and what depends on it. It's also where you edit a model and review the change.
A score out of 100 and a list of problems found in the SQL. Show me jumps to each one.
Every column in a final table that still carries personal data, with where it came from. Download it as a CSV, or download the whole lineage as JSON.
Three small sets of symbols carry most of the information.
md5(email) or the last four digits of a cardMIN, MAX and ANY_VALUE return a real value from the group, so personal data stays readable through them.
With Focus on selection on, everything not on the path is hidden. Show everything brings it back.
These use the sample store that loads the first time you open Upstream. If you've loaded something else, click Load the sample first.
Trace the revenue on the daily revenue table back to the raw data.
line_total, and line_total is quantity × unit price minus discount. So revenue is already net of discounts.Find every place a customer's email address ends up.
Hash the email in staging and see what that would break.
lower(trim(email)) as email, to md5(lower(trim(email))) as email_hash,email but keep the md5(...). Nothing breaks, and the review shows the email is now better protected downstream.Three ways in, from quickest to most complete.
-- model: name above each query. Optionally list raw tables under -- sources..sql file becomes a model named after the file. Add your dbt sources.yml in the same upload to bring in source columns.dbt compile, then upload target/manifest.json. Upstream reads the compiled SQL for every model, so macros are already expanded.-- sources raw.orders: id, customer_id, total, created_at -- model: stg_orders select id as order_id, customer_id, total from raw.orders -- model: customer_totals select customer_id, sum(total) as lifetime_total from stg_orders group by customer_id
Each check looks for a real problem that data and governance teams run into. The score starts at 100 and drops 12 for each high, 5 for each medium and 1 for each low finding (up to 10 for lows).
| Check | Level | Why it matters | What to do |
|---|---|---|---|
| Personal data readable in a final model | high | Final tables feed dashboards, exports and vendors, so anyone who can read them can read the data. | Confirm every reader should see it, or mask it upstream. |
| Government ID or financial data readable | high | SSNs, passports and full card numbers carry the biggest risk if they leak. | Truncate, hash or drop it as early as possible. |
| Missing column | high | A query uses a column the table doesn't have, so it will fail when it runs. | Fix the name, or add the column upstream. |
| Model can't be read | high | A syntax error or a circular dependency. | Open the model and read the error. |
| Personal data loaded but never used | medium | Data you hold but don't need is still risk. Collecting less is the simplest privacy control. | Stop loading it. |
| SELECT * in a final model | medium | A new column upstream, personal data included, flows straight through without anyone deciding it should. | List the columns explicitly. |
| Unresolved references | medium | An ambiguous or unknown column, so the lineage for it may be incomplete. | Qualify it with a table alias. |
| Hashed identifiers in a final model | low | A hashed email can still be matched to the same email hashed elsewhere. | Treat it as pseudonymous, not anonymous. |
| Mart reads raw tables directly | low | It skips staging, so cleaning rules aren't applied the same way everywhere. | Read from the staging model instead. |
| Model nobody uses | low | A staging or intermediate model with no readers is usually leftover. | Delete it, or connect it. |
| Unused columns / undeclared sources | low | Housekeeping that keeps the map accurate. | Trim or declare them. |
No. It only reads the text of the SQL. It never connects to a database and never sees a single row. Your project is saved in this browser's storage and nothing is uploaded anywhere.
Standard SELECT queries with CTEs, subqueries, joins (including USING), UNION, window functions, CASE, casts and common functions. It also handles Snowflake SELECT * EXCLUDE, BigQuery SELECT * EXCEPT, referring to an earlier alias in the same SELECT, and dbt ref() and source().
manifest.jsonSELECT * on a table whose columns it doesn't know. List those under sources.When it isn't sure, it says so in the warnings instead of guessing.
By column name: email, phone, first and last name, address, zip code, birth date, SSN, passport, card number, IP address and so on. Names can be misleading, so click any raw column and set its tag yourself. Every column downstream updates.
MAX, MIN and ANY_VALUE return one real value from the group, so an actual email address comes out. COUNT and SUM return a number about the group, so no single person's value shows.
Columns in WHERE, JOIN, GROUP BY, HAVING and QUALIFY don't appear in the result, but they decide which rows are in it. If someone changes how status is spelled, a filter on it can quietly drop rows. Upstream lists those columns separately for each model.
No. Those tools connect to your warehouse and cover much more. Upstream is for quick, private answers from the SQL alone: no setup, no accounts, and nothing to install.
Open Upstream with the sample loaded, or take the tour first.