Sub topic 1
Data Lineage and Audit Logs in Unity Catalog
Prerequisites
This chapter assumes basic SQL, familiarity with Databricks notebooks and SQL warehouses, and knowledge of the three-level namespace: catalog.schema.table.
Unity Catalog in brief
Unity Catalog is Databricks' centralized governance layer. A metastore is the top-level container for metadata and permissions across connected workspaces. It contains catalogs, which contain schemas, which contain tables, views, volumes, and functions.
These objects are called securables because access to each one can be controlled. A privilege is an allowed action, such as USE CATALOG, USE SCHEMA, or SELECT. Grants can apply at different levels. For example, a user may be allowed to use a schema but read only selected tables inside it. Groups are usually better than individual users for managing grants.
What lineage records
Data lineage records relationships between data assets. Table-level lineage shows which source tables contributed to a target table or view. Column-level lineage goes further and records relationships such as orders.amount feeding daily_revenue.revenue.
Lineage answers questions such as:
- Which tables produced this report?
- What could break if I change this source table?
- Which source columns affect this sensitive column?
- Which jobs, notebooks, or queries created the dependency?
How Unity Catalog captures lineage
Unity Catalog captures lineage during supported runtime activity. When a query, notebook, or job reads from and writes to registered assets, Unity Catalog records the relationship. The captured metadata can include the source and target objects, columns, event time, and the entity that performed the operation.
Lineage describes observed activity. It is therefore different from a manually documented design. A table that has never been used in a captured operation may have no recorded lineage.
Tracing dependencies in Catalog Explorer
Open a catalog, schema, or table in Catalog Explorer and select its Lineage view. The graph shows upstream assets, which are inputs, and downstream assets, which depend on the selected object. Select a neighboring node to continue tracing the dependency path. Use the graph before changing a table schema, retiring a table, or changing sensitive data.
Lineage visibility follows Unity Catalog permissions. A user may not see every object or relationship if the user lacks access to the relevant metadata or data assets.
Exercise
A team wants to rename a column in main.sales.orders. What should it inspect first?
Show answer
It should open the table's downstream lineage in Catalog Explorer and identify dependent tables, columns, jobs, notebooks, and dashboards.