As data pipelines grow more complex, you need a system that can immediately answer questions like "if I change this table, what downstream assets are affected?" or "which source columns produced this number in the gold table?" Unity Catalog Lineage automatically records table-to-table and column-to-column dependencies for Spark jobs running on Databricks, and lets you explore them through both the UI and APIs.
This article walks through how lineage works, how to visualize it in the UI, the Information Schema views, programmatic access via the REST API, the details of column-level lineage, the practical impact-analysis workflow, and the points the Databricks certification exams focus on.
Data lineage is the recorded trail of where data came from, how it was transformed, and where it was stored. Unity Catalog Lineage automatically captures the relationship between tables a Spark job reads from (upstream) and writes to (downstream). You do not need to add special annotations to your ETL code.
Having these three layers accumulate automatically streamlines both data governance and incident investigation.
The most intuitive way to inspect lineage is the Data Explorer (Catalog Explorer) UI. On a table's detail page, opening the Lineage tab renders the upstream tables (sources read from) and downstream tables (sinks written to) as a directed graph.
The UI is also well-suited for sharing with non-technical stakeholders — it is a great way to explain to business users where the numbers in a given report come from.
When you want to retrieve lineage information programmatically, the dedicated views in the Information Schema are the most convenient. Unity Catalog's Information Schema lives under system.information_schema.
-- テーブルレベルのリネージ: どのテーブルがどのテーブルに依存しているか
SELECT
source_table_full_name,
target_table_full_name,
event_type, -- READ / WRITE
created_by, -- 実行ユーザー
event_time
FROM system.access.table_lineage
WHERE target_table_full_name = 'prod.gold.daily_revenue'
ORDER BY event_time DESC
LIMIT 50;
-- カラムレベルのリネージ: 特定カラムの算出元を逆引き
SELECT
source_table_full_name,
source_column_name,
target_table_full_name,
target_column_name,
event_time
FROM system.access.column_lineage
WHERE target_table_full_name = 'prod.gold.daily_revenue'
AND target_column_name = 'total_amount'
ORDER BY event_time DESC;system.access.table_lineage exposes table-level dependencies, while system.access.column_lineage exposes column-level dependencies. Access to these views requires metastore admin or account admin privileges.
The REST API is the best fit for integrating with CI/CD pipelines or external governance tools. Use the Unity Catalog API's /lineage-tracking endpoints.
# テーブルの上流リネージを取得
GET /api/2.1/unity-catalog/lineage-tracking/table-lineage
?table_name=prod.gold.daily_revenue
&direction=UPSTREAM
# レスポンス例(簡略化)
{
"upstreams": [
{
"tableInfo": {
"name": "prod.silver.orders",
"catalog_name": "prod",
"schema_name": "silver"
},
"notebookInfos": [
{
"notebook_id": "12345",
"workspace_id": "67890"
}
]
}
]
}
# カラムレベルの上流リネージを取得
GET /api/2.1/unity-catalog/lineage-tracking/column-lineage
?table_name=prod.gold.daily_revenue
&column_name=total_amountOn the REST API, the direction parameter toggles between UPSTREAM (upstream) and DOWNSTREAM (downstream). Use DOWNSTREAM for impact analysis and UPSTREAM for root-cause investigation.
Column-level lineage tracks at a finer granularity than table-level. Databricks analyzes the logical plan Spark executes (via the Catalyst Optimizer) to derive the transformation path from input columns to output columns.
| Transformation | Column Lineage Behavior |
|---|---|
| SELECT a, b FROM ... | Recorded as a one-to-one mapping |
| SELECT a + b AS total FROM ... | Many-to-one mapping: a, b → total |
| JOIN ON t1.id = t2.id | Mappings from both tables' columns to the output columns |
| UDF (User-Defined Function) | Input columns → output columns (UDF internals remain opaque) |
| Window functions (RANK, ROW_NUMBER) | Dependencies from the partition key and order key |
Because UDF internals cannot be analyzed from Spark's logical plan, column lineage is recorded only at the level of "UDF input columns → UDF output columns." Note that you cannot tell which columns the UDF actually used internally.
Impact analysis is the practice of enumerating, ahead of a change, which downstream tables, dashboards, and jobs will be affected when you modify a table or column. The lineage-driven workflow looks like this:
-- 影響分析: silver.ordersを変更した場合の下流テーブルを洗い出し
SELECT DISTINCT
target_table_full_name,
target_column_name
FROM system.access.column_lineage
WHERE source_table_full_name = 'prod.silver.orders'
AND source_column_name = 'amount'
ORDER BY target_table_full_name;
-- 結果例:
-- prod.gold.daily_revenue | total_amount
-- prod.gold.customer_summary | lifetime_value
-- prod.gold.monthly_report | gross_salesFrom this result, you can see that retyping or renaming the silver.orders.amount column requires re-validating three downstream Gold tables.
Data Engineer Professional
問題 1
A data engineer plans to change the type of the amount column in the Silver-layer orders table from DECIMAL(10,2) to DECIMAL(18,4). Before making the change, they want to enumerate every downstream table that depends on this column. Which approach is most appropriate?
正解: A
The column_lineage view records column-level dependencies and can accurately enumerate the downstream tables and columns that depend on a specific column. grep is a code search and cannot capture runtime dependencies. The schema tab only shows the structure of the table itself, not its downstream consumers. DESCRIBE HISTORY shows change history, which has nothing to do with downstream dependencies.
What granularity does Unity Catalog Lineage track?
Both table-level and column-level. Table-level captures dependencies such as "table A was written into table B," while column-level visualizes the transformation path, such as "column_x in table A was used to derive column_y in table B." Column-level lineage is built automatically by analyzing Spark SQL and DataFrame API transformations.
How can lineage information be retrieved programmatically?
There are three options: (1) the graph view in the Data Explorer UI, (2) SQL queries against the TABLE_LINEAGE and COLUMN_LINEAGE views in the Information Schema, and (3) the /lineage-tracking endpoints on the Unity Catalog REST API. The REST API is best for automation and CI/CD pipelines, while the UI or SQL are convenient for ad hoc investigation.
What are the prerequisites for using lineage?
You need a Unity Catalog-enabled workspace on a Premium-or-higher plan. Lineage is captured automatically for tables and views registered in Unity Catalog with no extra configuration. However, writes that bypass Databricks (for example, Airflow writing directly to cloud storage) are not reflected. Only Spark jobs executed on Databricks are tracked.
Practice with certification-focused question sets
無料で問題を解いてみるNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Databricks Certifications: All 7 Exams, Difficulty & Study Plan (2026)
Complete guide to all 7 Databricks certifications — Data Eng...
Databricks Exam Difficulty Ranking: All 7 Certs Compared (2026)
Every Databricks certification ranked by difficulty, with st...
Databricks Study Guide: Fastest Pass Route & Time Estimates (2026)
How to pass Databricks certifications efficiently. Official ...
Databricks Data Engineer Associate: Complete Guide (2026)
Domain-by-domain breakdown of the Databricks Certified Data ...
Databricks Data Engineer Professional: Complete Guide (2026)
Tactics for the Databricks Certified Data Engineer Professio...