Sub topic 8
Who can see which lineage
This chapter assumes you know the Unity Catalog three-level namespace, the GRANT statement, and how to run SQL in a notebook or SQL warehouse. It covers two separate access paths to lineage: the graph in Catalog Explorer and the lineage system tables.
Two doors, two rules
Unity Catalog records lineage for the whole metastore. What you see depends on how you ask for it.
- Catalog Explorer filters the graph by your own privileges.
- System tables such as
system.access.table_lineageare governed by explicit grants on thesystemcatalog. Anyone who can read them sees every recorded row.
What you see in Catalog Explorer
In the lineage graph, you see full details only for objects you can access. You need SELECT on a table, or BROWSE on its catalog, to see its name and details. Upstream or downstream objects you cannot access still appear as nodes, but their details are hidden. The edge shows that a dependency exists, and you cannot tell which object it is.
Two practical consequences follow:
- Two users looking at the same table can see different graphs.
- A graph that looks short may be incomplete for you, not for the table. Before concluding that nothing reads a table, check whether you lack access to its consumers.
What you see in system tables
Ordinary users cannot read the system catalog by default. A metastore admin must make the access schema available and grant access explicitly. Grant to a group, not to individuals:
GRANT USE CATALOG ON CATALOG system TO `data-governance`;
GRANT USE SCHEMA ON SCHEMA system.access TO `data-governance`;
GRANT SELECT ON TABLE system.access.table_lineage TO `data-governance`;
GRANT SELECT ON TABLE system.access.column_lineage TO `data-governance`;
GRANT SELECT ON TABLE system.access.audit TO `data-governance`;Each statement is needed. SELECT alone fails without USE CATALOG and USE SCHEMA, because Unity Catalog checks the whole path from catalog to table.
Sharing less than everything
If a team needs lineage for its own area only, don't grant the system tables. Create a view that filters them. Run this as an owner who can read the system tables. Then grant SELECT on the view only. This assumes a governance.lineage schema already exists:
CREATE VIEW governance.lineage.sales_lineage AS
SELECT
source_table_full_name,
target_table_full_name,
entity_type,
event_time
FROM system.access.table_lineage
WHERE source_table_full_name LIKE 'main.sales.%'
OR target_table_full_name LIKE 'main.sales.%';
GRANT USE CATALOG ON CATALOG governance TO `sales-analysts`;
GRANT USE SCHEMA ON SCHEMA governance.lineage TO `sales-analysts`;
GRANT SELECT ON VIEW governance.lineage.sales_lineage TO `sales-analysts`;The view runs with its owner's rights. Users get only the rows it returns and never touch the system catalog. The filter also exposes the other end of any edge that crosses the boundary, such as a main.finance table that feeds main.sales. Check the output before you share it.
Common errors
| Symptom | Likely cause |
|---|---|
| `system.access` schema not found | The schema has not been enabled for the metastore. |
| Permission denied on a system table | Missing `USE CATALOG`, `USE SCHEMA`, or `SELECT`. |
| Graph shows nodes with hidden details | You lack `SELECT` or `BROWSE` on those objects. |
| A user sees a different graph than you | Privileges differ. This is expected. |
Exercise
An analyst can open a table's lineage graph in Catalog Explorer but sees several upstream nodes with hidden details. You then grant them SELECT on system.access.table_lineage, and the queries still fail with a permission error. What is missing, and what new exposure does the grant create?
Show answer
The analyst also needs USE CATALOG on the system catalog and USE SCHEMA on system.access, because Unity Catalog checks the full path. Once those are granted, the analyst can read lineage rows for the whole metastore, including names of tables they cannot access. This is more than the Catalog Explorer graph showed them. If that is too broad, grant a filtered view instead.