Summarizes Google Cloud Data Lineage graphs to help users debug data quality issues and understand data provenance for BQ/GCS. Use when summarizing upstream and
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-datalineage-summary-c3d3a4060d28 ,按照其中的说明把「datalineage-summary」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
This skill guides the agent in investigating and summarizing the Data Lineage graph for a specific focal asset (Table-Level Lineage) or specific fields (Column-Level Lineage). It provides an intuitive left-to-right walkthrough of how data enters and leaves the asset, abstracting away complex node and link details into plain English.
This skill relies on the Google Cloud Data Lineage (Knowledge Catalog) MCP
Server for graph traversal. Ensure you can run search_lineage queries in
both upstream and downstream directions. For detailed connection configurations
and tool schemas, refer to MCP Usage.
Fetch the lineage graph in both directions from the focal point (both upstream
and downstream) by making two separate calls to the MCP tool: one with
"direction": "UPSTREAM" and another with "direction": "DOWNSTREAM".
Location Strategy: You MUST use the read_url tool to fetch the
comprehensive list of locations dynamically from the provided
Knowledge Catalog Locations
link. To ensure cross-regional lineage is not missed, always verify the
current list of GCP regions using this link before populating the
locations array. You MUST populate the locations array with all
supported physical regions fetched from this link. You may optionally
additionally determine the asset's specific active region (using bq show
or gcloud storage ls).
Search Parameters: Use maxDepth = 10, maxResults = 5000 and
maxProcessPerLink = 10 as robust defaults when calling search_lineage.
For example, a DOWNSTREAM call should be formatted like this (expanding the
locations array as needed):
{
"parent": "projects/project_id/locations/us",
"locations": [
"us",
"us-central1",
"us-east1",
"us-west1",
"europe-west1",
"asia-northeast1"
],
"rootCriteria": {
"entities": {
"entities": [
{
"fullyQualifiedName": "bigquery:project.dataset.table"
}
]
}
},
"direction": "DOWNSTREAM",
"limits": {
"maxDepth": 10,
"maxResults": 5000,
"maxProcessPerLink": 10
}
}
Ensure you make a similar call with "direction": "UPSTREAM" to fetch the
upstream lineage.
Column-Level Lineage (CLL): The search_lineage tool can find all
Column-Level Lineage (CLL) by configuring the field array. If Table-Level
Lineage (TLL) is requested, configure the call to get CLL links along with
the TLL links by exploiting the "*" wildcard. For example:
"rootCriteria": {
"entities": {
"entities": [
{
"fullyQualifiedName": "bigquery:project.dataset.table",
"field": [
"*"
]
}
]
}
}
If evaluating a specific column, replace "*" with the specific column name
(e.g., "efficiency_score").
Generate the summary using the prompt guidelines below.
**Upstream Lineage:**.
Narrative must detail how data arrives at the focal asset, mentioning
key source systems, projects, and processing tasks (e.g., Spark on
Dataproc).**Downstream Lineage:**. Detail where data goes from the focal asset to final
consumer systems.{list_of_locations_queried}{parent_path}{maxDepth}{maxProcessPerLink}Return the final summarized output back to the user.