Data Lineage Guide
Overview
Use this skill any time the user wants to understand data flow, trace data origins, identify downstream impacts, or analyze how data pipelines have changed over time. This skill guides users through exploring data lineage relationships in a structured way, ensuring they understand the scope and depth of lineage traversal before executing queries.
Phase 0: Intent Detection and Entry Path Selection
Always start by understanding what the user wants to accomplish and which entry path is most appropriate:
Entry Path A: Direct Lineage Search (Lineage-First)
Use when the user mentions an asset name but doesn't specify a catalog/project context, or when they want to search across all lineage assets.
- Tool:
search_lineage_assets
- Best for: "Find the lineage for CUSTOMER_360", "What feeds into the sales table?"
- Supports: Optional filters for technology type and asset type
Entry Path B: Catalog Asset Lookup (Catalog-First)
Use when the user references a known catalog or project asset, or provides specific container context.
- Tools:
search_asset → convert_asset_to_lineage_id
- Best for: "Show lineage for the ORDERS table in the sales catalog", "Trace the customer_data asset in AgentTest project"
- Requires: Container context (catalog or project name)
Decision Logic:
- If user mentions "catalog" or "project" name → Use Path B (Catalog-First)
- If user only provides asset name without container → Use Path A (Lineage-First)
- If uncertain → Ask user to clarify or default to Path A
Phase 1: Asset Identification
Locate the starting asset(s) in the lineage graph using the appropriate entry path.
Path A: Direct Lineage Search
Path B: Catalog Asset Lookup
Important Validation:
- Lineage IDs must be exactly 64 hexadecimal characters
- If you receive a shorter ID or UUID, you MUST use
convert_asset_to_lineage_id to convert it
- Never proceed to Phase 2 without a valid 64-character lineage ID
Phase 2: Lineage Graph Traversal
Retrieve and present the upstream and downstream lineage relationships.
Critical: Inform User About Traversal Depth
BEFORE calling get_lineage_graph, you MUST:
Executing Lineage Graph Query
Presenting Lineage Results
Special Cases
Finding Path Between Two Assets:
- If user asks "trace from Asset A to Asset B" or "path between X and Y":
- Get lineage IDs for both assets (Phase 1)
- Call
get_lineage_graph with:
lineage_ids: [lineage_id_A, lineage_id_B]
hop_up: "50"
hop_down: "50"
ultimate: "" (empty string)
- Search the returned graph for the path connecting the two assets
Impact Analysis:
- If user asks "what would break if we changed X?":
- Focus on downstream traversal
- Set
hop_down to "50" for complete impact view
- Highlight all dependent tables, reports, and data products
Source Tracing:
- If user asks "where does this data come from originally?":
- Focus on upstream traversal
- Set
hop_up to "50" or use ultimate: "source"
- Identify the terminal source asset(s)
Phase 3: Historical Lineage Comparison (Optional)
Note: This phase depends on the list_lineage_versions tool which provides version timestamps for historical comparison.
Use this phase when the user wants to understand how the data pipeline has changed over time.
Natural Language Date Conversion:
- "since Friday" → Calculate the date of the most recent Friday and convert to ISO 8601
- "since last week" → Calculate 7 days ago from current date
- "since last month" → Calculate 30 days ago or first day of previous month
- "in the last 3 days" → Calculate 3 days ago from current date
- "this year" → Use current year start (e.g., "2026-01-01T00:00:00Z")
- Use the current time to calculate relative dates accurately
If user is comparing assets:
- Call
get_lineage_comparison with:
compared_lineage_assets: Asset IDs to compare
base_version: Later date (more recent version)
compared_version: Earlier date (older version)
If user is comparing graphs:
- Call
get_lineage_comparison with:
initial_lineage_assets: Asset IDs that were passed to get_lineage_graph as lineage_ids
compared_lineage_assets: All asset IDs returned by get_lineage_graph
base_version: Later date (more recent version)
compared_version: Earlier date (older version)
Historical Comparison Example Workflow
User: "Has anything changed in the pipeline for our revenue dashboard in the last month?"
- Find the revenue dashboard asset (Phase 1)
- Call
list_lineage_versions with since="2025-11-01Z" and until="2025-12-01Z"
- Get version timestamps (e.g., ["2025-11-01T00:00:00Z", "2025-11-15T00:00:00Z", "2025-12-01T00:00:00Z"])
- Call
get_lineage_graph with dates=["2025-11-01T00:00:00Z", "2025-12-01T00:00:00Z"]
- Call
get_lineage_comparison with:
initial_lineage_assets: Same asset IDs used as lineage_ids in get_lineage_graph
compared_lineage_assets: All asset IDs returned by get_lineage_graph
base_version: "2025-12-01T00:00:00Z" (later date)
compared_version: "2025-11-01T00:00:00Z" (earlier date)
Important Guidelines
Lineage ID Validation
- CRITICAL:
get_lineage_graph ONLY accepts 64-character hexadecimal lineage IDs
- Before calling
get_lineage_graph, verify each lineage_id:
- Length is exactly 64 characters
- Contains only hexadecimal characters (0-9, a-f)
- If validation fails, use
convert_asset_to_lineage_id or search_lineage_assets to get valid IDs
Hop Depth Best Practices
- Always inform the user about the 3-hop default limitation before executing
- Always confirm the user's preferred traversal depth
- Use hop values strategically:
- "1": Immediate neighbors only
- "3": Standard view (default)
- "50": Deep traversal for complete pipeline view
- "0": Exclude that direction entirely
Response Completeness
- Always return complete results - never truncate lineage assets or edges
- Always include the UI visualization URL in your response
- Always explain what the lineage graph shows in business terms, not just technical details
Error Handling
- If no assets found in Phase 1, suggest alternative search terms or filters
- If lineage graph is empty, explain possible reasons (asset not yet scanned, no relationships, etc.)
- If historical versions not available, explain that lineage versioning may not be enabled
Multi-Asset Queries
- When user provides multiple asset names, get lineage IDs for all of them
- Pass all lineage IDs together to
get_lineage_graph to see relationships between them
- Use hop_up="50" and hop_down="50" for multi-asset queries to capture connections
Skill Completion
After completing the lineage exploration workflow:
- Summarize what was discovered (sources, consumers, changes)
- Provide the UI visualization link for further exploration
- Offer to explore related aspects (e.g., "Would you like to see the data quality metrics for these assets?")
- If historical comparison was performed, highlight the most significant changes
//: # (Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0\))
//: # (See the LICENSE file in the project root for license information.)
1---2name: lineage3description: Use this skill to explore upstream/downstream data lineage and historical lineage changes through a guided 3-phase workflow - asset identification → lineage graph traversal → historical version comparison. Handles both direct lineage search and catalog-first lookup with ID conversion. Triggers when user asks about data relationships, sources, or consumers using phrases like - "what feeds", "what feeds into", "what feeds in", "where does X come from", "what sources", "what produces", "upstream", "downstream", "lineage", "impact analysis", "data pipeline", "trace this data", "what depends on", "what consumes", "what changed", "data flow", "source to target", "pipeline history", "lineage changes", "show lineage for", "get lineage of", "what is impacted"4---56# Data Lineage Guide78## Overview910Use this skill any time the user wants to understand data flow, trace data origins, identify downstream impacts, or analyze how data pipelines have changed over time. This skill guides users through exploring data lineage relationships in a structured way, ensuring they understand the scope and depth of lineage traversal before executing queries.1112## Phase 0: Intent Detection and Entry Path Selection1314Always start by understanding what the user wants to accomplish and which entry path is most appropriate:1516### Entry Path A: Direct Lineage Search (Lineage-First)17Use when the user mentions an asset name but doesn't specify a catalog/project context, or when they want to search across all lineage assets.18- **Tool**: `search_lineage_assets`19- **Best for**: "Find the lineage for CUSTOMER_360", "What feeds into the sales table?"20- **Supports**: Optional filters for technology type and asset type2122### Entry Path B: Catalog Asset Lookup (Catalog-First)23Use when the user references a known catalog or project asset, or provides specific container context.24- **Tools**: `search_asset` → `convert_asset_to_lineage_id`25- **Best for**: "Show lineage for the ORDERS table in the sales catalog", "Trace the customer_data asset in AgentTest project"26- **Requires**: Container context (catalog or project name)2728**Decision Logic**:29- If user mentions "catalog" or "project" name → Use Path B (Catalog-First)30- If user only provides asset name without container → Use Path A (Lineage-First)31- If uncertain → Ask user to clarify or default to Path A3233## Phase 1: Asset Identification3435Locate the starting asset(s) in the lineage graph using the appropriate entry path.3637### Path A: Direct Lineage Search3839<Steps>40<Step>411. Call `search_lineage_assets` with the asset name provided by the user. Include optional filters if the user specifies:42 - `technology_name`: Only if user mentions specific technology (e.g., "PostgreSQL", "Azure SQL")43 - `asset_type`: Only if user mentions specific type (e.g., "Table", "Column", "View")44 - `tag`: If user mentions tagged assets45 - `business_term` or `business_classification`: If user mentions governance metadata46 - `data_quality_operator` and `data_quality_value`: If user mentions quality thresholds47</Step>48<Step>492. The tool returns a list of matching lineage assets with their 64-character hexadecimal lineage IDs, names, types, and hierarchical paths.50</Step>51<Step>523. Present the matched assets to the user in a clear format showing:53 - Asset name54 - Asset type55 - Full hierarchical path (identity_key)56 - Parent asset information if available57</Step>58<Step>594. If multiple assets match, ask the user to confirm which asset(s) they want to explore. If only one asset matches, confirm it's the correct one before proceeding.60</Step>61<Step>625. Extract and save the lineage ID(s) from the confirmed asset(s) for Phase 2.63</Step>64</Steps>6566### Path B: Catalog Asset Lookup6768<Steps>69<Step>701. Call `search_asset` with:71 - `search_prompt`: The user's asset description72 - `container_type`: "catalog" or "project" based on user's context73</Step>74<Step>752. Present the search results to the user, showing asset names, IDs, and container information.76</Step>77<Step>783. Ask the user to confirm which asset they want to explore.79</Step>80<Step>814. Once confirmed, call `convert_asset_to_lineage_id` with:82 - `container_id`: The catalog or project ID from the search result83 - `asset_id`: The asset ID from the search result84</Step>85<Step>865. The tool returns the 64-character hexadecimal lineage ID required for lineage graph queries.87</Step>88<Step>896. Save the lineage ID for Phase 2.90</Step>91</Steps>9293**Important Validation**:94- Lineage IDs must be exactly 64 hexadecimal characters95- If you receive a shorter ID or UUID, you MUST use `convert_asset_to_lineage_id` to convert it96- Never proceed to Phase 2 without a valid 64-character lineage ID9798## Phase 2: Lineage Graph Traversal99100Retrieve and present the upstream and downstream lineage relationships.101102### Critical: Inform User About Traversal Depth103104**BEFORE calling `get_lineage_graph`, you MUST**:105106<Steps>107<Step>1081. Explain to the user that the default lineage traversal depth is **3 hops** in each direction (upstream and downstream). This means:109 - **3 hops upstream**: Shows 3 levels of data sources feeding into the asset110 - **3 hops downstream**: Shows 3 levels of consumers using the asset's data111 - **Limitation**: For complex or deeply nested pipelines, 3 hops may not capture the complete data flow112</Step>113<Step>1142. Present the user with traversal depth options:115 - **Immediate lineage (1-2 hops)**: Direct producers and consumers only116 - **Standard lineage (3 hops - default)**: Broader pipeline context, good for most use cases117 - **Full lineage (deep traversal - 50 hops)**: Complete path to ultimate sources and targets118 - Note: If the returned terminal asset ID matches the query asset ID, that asset IS the ultimate source/target119</Step>120<Step>1213. Ask the user which depth they prefer, or confirm if they want to proceed with the default 3 hops.122</Step>123</Steps>124125### Executing Lineage Graph Query126127<Steps>128<Step>1294. Based on the user's depth preference, call `get_lineage_graph` with:130 - `lineage_ids`: The 64-character lineage ID(s) from Phase 1 (can be a single ID or list of IDs)131 - `hop_up`: Number of upstream levels132 - "1" for immediate upstream133 - "3" for standard (default)134 - "50" for full upstream traversal135 - "0" if user only wants downstream136 - `hop_down`: Number of downstream levels137 - "1" for immediate downstream138 - "3" for standard (default)139 - "50" for full downstream traversal140 - "0" if user only wants upstream141 - `ultimate`: Optional parameter for ultimate source/target queries142 - "source" for ultimate source only143 - "target" for ultimate target only144 - "both" for both ultimate source and target145 - "" (empty string) when finding path between two assets146 - None for standard hop-based traversal147</Step>148<Step>1495. The tool returns:150 - `lineage_assets`: Complete list of assets in the lineage graph with metadata (name, type, tags, identity_key, parent info)151 - `edges_in_view`: Connections showing data flow (format: "edge from: AssetA, to: AssetB, relation: RelationType")152 - `url`: Direct link to visualize the lineage graph in the UI153</Step>154</Steps>155156### Presenting Lineage Results157158<Steps>159<Step>1606. Present the lineage graph results in a structured format:161 - **Upstream Sources**: List assets that feed data into the queried asset, organized by hop level if possible162 - **Downstream Consumers**: List assets that consume data from the queried asset, organized by hop level if possible163 - **Transformation Steps**: Highlight any transformation or processing assets in the pipeline164 - **Data Flow Connections**: Summarize key relationships from the edges_in_view165</Step>166<Step>1677. **ALWAYS include the UI visualization URL** in your response so users can explore the interactive lineage graph.168</Step>169<Step>1708. If the user requested ultimate source/target and the returned asset ID matches the query asset ID, explicitly state: "This asset IS the ultimate [source/target] - there are no further [upstream/downstream] dependencies."171</Step>172</Steps>173174### Special Cases175176**Finding Path Between Two Assets**:177- If user asks "trace from Asset A to Asset B" or "path between X and Y":178 1. Get lineage IDs for both assets (Phase 1)179 2. Call `get_lineage_graph` with:180 - `lineage_ids`: [lineage_id_A, lineage_id_B]181 - `hop_up`: "50"182 - `hop_down`: "50"183 - `ultimate`: "" (empty string)184 3. Search the returned graph for the path connecting the two assets185186**Impact Analysis**:187- If user asks "what would break if we changed X?":188 1. Focus on downstream traversal189 2. Set `hop_down` to "50" for complete impact view190 3. Highlight all dependent tables, reports, and data products191192**Source Tracing**:193- If user asks "where does this data come from originally?":194 1. Focus on upstream traversal195 2. Set `hop_up` to "50" or use `ultimate`: "source"196 3. Identify the terminal source asset(s)197198## Phase 3: Historical Lineage Comparison (Optional)199200**Note**: This phase depends on the `list_lineage_versions` tool which provides version timestamps for historical comparison.201202Use this phase when the user wants to understand how the data pipeline has changed over time.203204<Steps>205<Step>2061. Determine if the user wants historical comparison by looking for phrases like:207 - "what changed in the pipeline"208 - "has anything changed since [date]"209 - "compare lineage from [date] to [date]"210 - "pipeline changes over time"211 - "what's new in the data flow"212</Step>213<Step>2142. If historical comparison is requested, convert any natural language dates to ISO 8601 format, then call `list_lineage_versions` with:215 - `since`: Start date in ISO 8601 format (e.g., "2025-01-01T00:00:00Z" or "2025Z" for year)216 - `until`: End date in ISO 8601 format (e.g., "2025-12-31T23:59:59Z" or "2025Z" for year)217 218 **Natural Language Date Conversion**:219 - "since Friday" → Calculate the date of the most recent Friday and convert to ISO 8601220 - "since last week" → Calculate 7 days ago from current date221 - "since last month" → Calculate 30 days ago or first day of previous month222 - "in the last 3 days" → Calculate 3 days ago from current date223 - "this year" → Use current year start (e.g., "2026-01-01T00:00:00Z")224 - Use the current time to calculate relative dates accurately225</Step>226<Step>2273. The tool returns a list of available lineage version timestamps between the specified dates.228</Step>229<Step>2304. Select two versions to compare (typically first and last, or user-specified dates).231</Step>232<Step>2335. If user wants version comparison done for assets, call `search_lineage_assets` with `dates` parameter. Otherwise, if user wants comparison to be done for graph, use `get_lineage_graph` with the `dates` parameter:234 - Call with `dates` parameter containing the two version timestamps235 - This retrieves the lineage graph as it existed at those two points in time236</Step>237<Step>2386. Compare the two lineage graphs and identify changes:239 240 **If user is comparing assets:**241 - Call `get_lineage_comparison` with:242 - `compared_lineage_assets`: Asset IDs to compare243 - `base_version`: Later date (more recent version)244 - `compared_version`: Earlier date (older version)245 246 **If user is comparing graphs:**247 - Call `get_lineage_comparison` with:248 - `initial_lineage_assets`: Asset IDs that were passed to `get_lineage_graph` as `lineage_ids`249 - `compared_lineage_assets`: All asset IDs returned by `get_lineage_graph`250 - `base_version`: Later date (more recent version)251 - `compared_version`: Earlier date (older version)252</Step>253<Step>2547. Present a clear summary of changes:255 - List new assets with their types and roles256 - List removed assets and their previous roles257 - Highlight significant changes in data flow patterns258 - Note any changes in data quality or governance metadata259</Step>260</Steps>261262### Historical Comparison Example Workflow263264User: "Has anything changed in the pipeline for our revenue dashboard in the last month?"2652661. Find the revenue dashboard asset (Phase 1)2672. Call `list_lineage_versions` with since="2025-11-01Z" and until="2025-12-01Z"2683. Get version timestamps (e.g., ["2025-11-01T00:00:00Z", "2025-11-15T00:00:00Z", "2025-12-01T00:00:00Z"])2694. Call `get_lineage_graph` with dates=["2025-11-01T00:00:00Z", "2025-12-01T00:00:00Z"]2705. Call `get_lineage_comparison` with:271 - `initial_lineage_assets`: Same asset IDs used as `lineage_ids` in `get_lineage_graph`272 - `compared_lineage_assets`: All asset IDs returned by `get_lineage_graph`273 - `base_version`: "2025-12-01T00:00:00Z" (later date)274 - `compared_version`: "2025-11-01T00:00:00Z" (earlier date)275276## Important Guidelines277278### Lineage ID Validation279- **CRITICAL**: `get_lineage_graph` ONLY accepts 64-character hexadecimal lineage IDs280- Before calling `get_lineage_graph`, verify each lineage_id:281 - Length is exactly 64 characters282 - Contains only hexadecimal characters (0-9, a-f)283- If validation fails, use `convert_asset_to_lineage_id` or `search_lineage_assets` to get valid IDs284285### Hop Depth Best Practices286- **Always inform the user** about the 3-hop default limitation before executing287- **Always confirm** the user's preferred traversal depth288- Use hop values strategically:289 - "1": Immediate neighbors only290 - "3": Standard view (default)291 - "50": Deep traversal for complete pipeline view292 - "0": Exclude that direction entirely293294### Response Completeness295- **Always return complete results** - never truncate lineage assets or edges296- **Always include the UI visualization URL** in your response297- **Always explain** what the lineage graph shows in business terms, not just technical details298299### Error Handling300- If no assets found in Phase 1, suggest alternative search terms or filters301- If lineage graph is empty, explain possible reasons (asset not yet scanned, no relationships, etc.)302- If historical versions not available, explain that lineage versioning may not be enabled303304### Multi-Asset Queries305- When user provides multiple asset names, get lineage IDs for all of them306- Pass all lineage IDs together to `get_lineage_graph` to see relationships between them307- Use hop_up="50" and hop_down="50" for multi-asset queries to capture connections308309## Skill Completion310311After completing the lineage exploration workflow:3121. Summarize what was discovered (sources, consumers, changes)3132. Provide the UI visualization link for further exploration3143. Offer to explore related aspects (e.g., "Would you like to see the data quality metrics for these assets?")3154. If historical comparison was performed, highlight the most significant changes316317---318319[//]: # (Copyright [2026] [IBM])320[//]: # (Licensed under the Apache License, Version 2.0 \(http://www.apache.org/licenses/LICENSE-2.0\))321[//]: # (See the LICENSE file in the project root for license information.)