Sub topic 4
Tracing upstream and downstream in Catalog Explorer
This chapter covers the Lineage tab and the lineage graph in Catalog Explorer. It assumes you can already do the following:
- Run queries and notebooks on Unity Catalog compute.
- Read three-level names such as
main.sales.orders. - Understand the earlier chapters on what lineage records and how Unity Catalog captures it at runtime.
By the end you should be able to trace a table's dependencies in both directions, inspect the jobs and notebooks that connect them, follow a single column, and explain why a graph can look incomplete.
Upstream and downstream
Two terms are used throughout this chapter:
- Upstream means the objects a table was built from. These are its sources.
- Downstream means the objects that read from a table or depend on it. These are its consumers.
Suppose main.sales.daily_revenue is built from main.sales.orders by a nightly job, and a dashboard reads daily_revenue. Then orders is upstream of daily_revenue, and the dashboard is downstream of it.
The two directions answer different questions:
| Direction | Typical question | Typical use |
|---|---|---|
| Upstream | Where did this number come from? | Debugging, trust, and audit evidence |
| Downstream | What breaks if I change this? | Impact analysis before a schema change or deprecation |
Opening the lineage view
Catalog Explorer shows lineage on the page for a table, view, or other supported object. The steps are:
- Open Catalog in the workspace sidebar.
- Browse to the table, for example
main>sales>daily_revenue. - Open the Lineage tab.
- Select See lineage graph to open the full graph.
The Lineage tab gives a short list. It shows the upstream and downstream tables and the other entities connected to the table. The graph shows the same relationships visually and lets you walk several hops away from the starting table.
Lineage appears only for data that was read or written on Unity Catalog compute. It is also limited to queries run since lineage capture applied to your account. If a table has never been used in a captured query, its Lineage tab is empty. An empty tab does not mean the table has no dependencies.
What appears in the graph
A node in the graph is not always a table. Lineage connects several kinds of entities:
- Tables and views, including streaming tables and materialized views.
- Notebooks, jobs, and pipelines that read or wrote the data.
- Queries and dashboards that consume it.
- Models and other assets that were trained on or served from it.
- External locations or paths, when data is read from or written to cloud storage that Unity Catalog can see.
The starting table is the center of the graph. Upstream nodes are on the left and downstream nodes are on the right. The lines show the direction of data flow.
The entity that did the work is as useful as the tables. Selecting the line or connector between two tables opens a panel that names the notebook, job, pipeline, or query that moved the data. In practice, this is how you find the code to open when a number looks wrong.
Walking the graph
You do not see the whole lineage at once. The graph starts with one or two hops around the starting table, and you expand it as you go.
- Expand a node. Selecting the expand control on a node loads its next set of upstream or downstream connections. Repeat this to follow a chain many hops long.
- Re-center on another table. Opening a table node's own page, or selecting it as the focus, lets you ask the same questions from the new position.
- Inspect a connection. Select a connector to see the notebook, job, or query behind it, and use the link in the panel to open it.
- Pan and zoom. Large graphs fan out quickly. Zoom out to see the overall shape and zoom in to read names.
A common workflow for a bad number is:
- Open the table that shows the wrong value.
- Go upstream one hop at a time.
- At each hop, open the connecting job or notebook and check its logic.
- Stop at the first hop where the value is already wrong.
A common workflow before a change runs the other way: go downstream and list every consumer you would affect, then contact their owners.
Column-level lineage in the graph
Table lineage tells you that daily_revenue depends on orders. It does not tell you which column feeds which. For that, use column lineage in the graph. You can expand a node to show its columns and select one. The graph then highlights the columns it is derived from upstream, and the columns that use it downstream.
This is the right tool for narrower questions:
- Which source column does
revenuecome from? - If I rename
orders.amount, which downstream columns are affected? - Does a sensitive column such as an email address reach a table that is shared more widely?
Column lineage is also captured at runtime, so it has the same gaps as table lineage. It follows direct references well. Complex expressions, and code that builds column names dynamically, may produce partial results. Treat what you see as evidence of a link, and treat absence as inconclusive. The later chapters on the system tables and on limitations cover this in more detail.
Why you may not see everything
Two things limit what the graph shows. The first is what you are allowed to see. The second is what was captured.
Permissions shape the view
You can only see lineage for objects you have access to. If an upstream or downstream node is a table you cannot read, Catalog Explorer does not reveal its details. The node can appear as a restricted placeholder, or the connection can be omitted. To see lineage for a table, you generally need the privileges that let you browse to it: USE CATALOG on its catalog, USE SCHEMA on its schema, and SELECT on the table. Lineage for notebooks, jobs, and dashboards follows the permissions on those objects.
This has two consequences:
- Two people can open the same graph and see different results.
- An incomplete graph can mean "not permitted", not "no dependency". If you are doing an impact analysis, ask someone with broader access to check, or use the system tables with a governance group that can read them.
The permissions chapter covers this in detail.
Capture shapes the view
Lineage is recorded when queries run, so the graph reflects activity, not declared design.
- A dependency that has never executed has no lineage.
- Lineage is kept for a limited period. A table that was last read 18 months ago may show no downstream consumers at all.
- Code that does not run on Unity Catalog compute, or that moves data outside Unity Catalog's view, leaves gaps.
Use the graph to answer "what has recently depended on this?" It cannot answer "what could ever depend on this?"
Matching the graph to SQL
The graph is good for exploring. SQL is better when you need a complete list, a filter, or something you can save or schedule. The lineage system tables hold the same underlying data. For example, the downstream tables of main.sales.orders come from this query, which matches what the graph shows when you expand orders to the right:
SELECT DISTINCT
target_table_full_name,
entity_type
FROM system.access.table_lineage
WHERE source_table_full_name = 'main.sales.orders'
AND target_table_full_name IS NOT NULL;A useful habit is to explore in Catalog Explorer first and then confirm the result with a query before you act on it. If the two disagree, the cause is usually permissions: you can see only part of the data in the graph, and the query may run with different access.
Common mistakes
- Treating an empty Lineage tab as proof of no dependencies. The table may not have been read or written since capture started, or the activity may be outside the retention window.
- Ignoring the connecting entity. The table nodes tell you what is related. The job or notebook tells you why and how.
- Assuming your view is the full graph. Hidden nodes depend on your privileges.
- Using table lineage for a column-level question. A table can depend on a source while only one of its columns does. Use column lineage when the question is about a single field.
- Skipping the downstream check before a change. Dashboards and notebooks are easy to miss when you only think about tables.
Exercise
A teammate opens the Lineage tab for main.sales.daily_revenue and sees no downstream objects. They conclude the table can be dropped safely. Give two reasons the conclusion might be wrong, and one way to check further.
Show answer
The graph may be incomplete because (1) lineage is recorded only when queries run on Unity Catalog compute and is kept for a limited period, so a consumer that runs rarely or ran before the retention window is missing, and (2) the teammate can see only objects they have privileges on, so downstream objects they cannot access may be hidden. To check further, query system.access.tablelineage with sourcetablefullname = 'main.sales.daily_revenue' using an account that can read the system tables, and also ask owners of related teams or review the audit log for recent reads of the table.
Exercise
You need to know which source column feeds the revenue column in daily_revenue. Which lineage view do you use in Catalog Explorer, and which system table gives the same answer in SQL?
Show answer
Use column lineage in the lineage graph: expand the table's columns and select revenue to highlight its upstream columns. The equivalent SQL source is system.access.columnlineage, filtered on targettablefullname = 'main.sales.dailyrevenue' and targetcolumn_name = 'revenue'.