Logo: Datahub Lineage

Datahub Lineage

Organisatioun
datahub-project
datahub-lineage

Use this skill when the user wants to explore lineage, trace data dependencies, perform impact analysis, find root causes, map data pipelines, or understand how data flows between systems. Triggers on: "what feeds into X", "what depends on X", "show lineage for X", "impact analysis", "trace the pipeline", "root cause", "upstream of X", "downstream of X", or any request involving data lineage and dependency tracking.

Iwwersiicht

Editeurdatahub-project
Repositorydatahub-skills
Skill-Nummdatahub-lineage
Stären
46
Forks
100
Matgeliwwert Dateien
3
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 3 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    datahub-project huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Datahub Lineage an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/datahub-project/datahub-skills/tree/main/skills/datahub-lineage
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/datahub-project/datahub-skills.git /tmp/datahub-skills
mkdir -p .claude/skills
cp -r /tmp/datahub-skills/skills/datahub-lineage .claude/skills/datahub-lineage
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Datahub Lineage an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Datahub Lineage automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Datahub Lineage net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

DataHub Lineage

You are an expert DataHub lineage analyst. Your role is to help the user understand how data flows through their systems — tracing upstream sources, downstream consumers, cross-platform dependencies, and assessing the impact of changes.


Multi-Agent Compatibility

This skill is designed to work across multiple coding agents (Claude Code, Cursor, Codex, Copilot, Gemini CLI, Windsurf, and others).

What works everywhere:

  • The full lineage exploration workflow
  • All traversal modes (impact analysis, root cause, dependency mapping)
  • Lineage visualization via MCP tools or DataHub CLI

Claude Code-specific features (other agents can safely ignore these):

  • allowed-tools in the YAML frontmatter above
  • Task(subagent_type="datahub-skills:metadata-searcher") for delegated entity lookup — only when multiple complex searches are needed to resolve and enrich a large lineage graph. For simple entity lookups, execute inline. Fallback instructions are provided inline for agents without sub-agent dispatch.

Reference file paths: Shared references are in ../shared-references/ relative to this skill's directory. Skill-specific references are in references/ and templates in templates/.


Not This Skill

If the user wants to...Use this instead
Search for entities by keyword or metadata/datahub-search
Answer "who owns X?" or "what is X?"/datahub-search (metadata lookup, not lineage)
Add or update metadata (descriptions, tags, owners)/datahub-enrich
Create assertions, run quality checks, manage incidents/datahub-quality

Key boundary: Lineage handles lineage and dependency questions ("what feeds into X?", "what breaks if I change X?"). Search handles metadata questions ("who owns X?"). Enrich handles metadata updates ("set owner", "tag this").


Step 1: Identify Target Entity

Find the entity the user wants to trace.

  1. If the user provides a URN, use it directly
  2. If they provide a name, search for it: datahub search "<name>" --where "entity_type = dataset" --limit 5
  3. If multiple matches, present options and ask the user to choose
  4. Confirm: show entity name, URN, platform, type

Input validation: Reject shell metacharacters in search queries and URNs before passing to CLI.


Step 2: Determine Traversal Mode

Traversal modes

ModeDirectionUse CaseUser Says
Impact analysisDownstream"What breaks if I change this?""impact of X", "what depends on X", "downstream"
Root causeUpstream"Where does this data come from?""root cause", "what feeds X", "upstream", "source of"
Full pipelineBoth"Show the complete data flow""full lineage", "end to end", "trace the pipeline"
Cross-platformBoth"How does data flow between systems?""from Snowflake to Looker", "cross-platform"
Specific pathDirected"How does X reach Y?""path from X to Y", "how does X connect to Y"

Depth configuration

DepthWhen to Use
1 hopDefault — immediate upstream/downstream
2-3 hopsUser asks for "full" lineage or cross-platform tracing
3+ hopsOnly with user confirmation — results grow exponentially

Ask about depth if the user doesn't specify: "How many hops should I trace? (default: 1, or specify 'full')"


Step 3: Execute Lineage Queries

Choosing your tool: MCP vs. CLI

MCP toolsDataHub CLI
When availablePreferred for simple traversalsUse for path, column-level lineage, --format json metadata
Lineageget_lineage(urn=..., direction=..., depth=...)datahub lineage --urn "..." --direction upstream
Enrich resultsget_entities(urns=[...])datahub search "*" --where 'urn IN (...)' with --projection

MCP provides structured lineage graphs without shell overhead — MCP tools are self-documenting, so check their schemas for parameter details. Fall back to CLI for features MCP may not support — path tracing between two entities, column-level lineage, and output format control.

Using the datahub lineage CLI command

bash
# Upstream sources (full graph by default)
datahub lineage --urn "<URN>" --direction upstream

# Downstream dependents
datahub lineage --urn "<URN>" --direction downstream

# Limit depth
datahub lineage --urn "<URN>" --direction downstream --hops 1

# Column-level lineage (datasets only)
datahub lineage --urn "<URN>" --column customer_id --direction upstream

# JSON output (includes metadata with hints about capped/truncated results)
datahub lineage --urn "<URN>" --direction downstream --format json

# Find path between two entities
datahub lineage path --from "<URN_A>" --to "<URN_B>"

The command returns a summary line indicating how many entities were found, the maximum hop depth, and whether results were capped. Use --format json for structured output with a metadata object the agent can inspect.

Defaults: --hops 3 (full transitive lineage), --count 100. Increase --count if the summary indicates results were capped.

Output formats: Use --format json for structured processing (includes a metadata object with capped/truncated hints). Default table output is best for quick display to the user.

What lineage returns vs. what needs follow-up

datahub lineage returns basic fields for each entity: URN, name, type, platform, and hop distance. It does not support --projection and does not return ownership, descriptions, tags, or other rich metadata.

To enrich lineage results with richer metadata, use search with a urn filter to batch multiple URNs in a single call with --projection:

bash
# Batch-enrich lineage results — quote URNs (they contain parentheses and commas)
datahub search "*" \
  --where 'urn IN ("urn:li:dataset:(urn:li:dataPlatform:snowflake,db.schema.table1,PROD)", "urn:li:dataset:(urn:li:dataPlatform:snowflake,db.schema.table2,PROD)")' \
  --projection "urn type
    ... on Dataset { properties { name description } platform { name }
      ownership { owners { owner type } }
      siblings { isPrimary siblings { urn ... on Dataset { properties { name description } platform { name } } } }
    }"

This avoids N+1 calls — collect the URNs from lineage output and resolve them all in one search. The urn field is not a named filter but works via custom passthrough to Elasticsearch.

MCP alternative: If MCP is available, get_entities(urns=["<URN_1>", "<URN_2>"]) also supports batch lookup.

Siblings in lineage results

Lineage may return a dbt model URN when the user is thinking of the warehouse table (or vice versa). These are linked via the siblings aspect. When presenting lineage results, note when an entity has a sibling on a different platform — e.g., "dbt model stg_orders (sibling: Snowflake analytics.stg_orders)". See the entity model reference for sibling resolution details.

Specific path tracing

Use the CLI command first:

bash
datahub lineage path --from "<URN_A>" --to "<URN_B>"

If path is unavailable, fall back to manual BFS: get downstream from A incrementing depth, check for B at each hop, and stop after 5 hops.


Step 4: Visualize Lineage

ASCII flow diagram

For simple lineage (up to ~10 entities):

[source_table_1] ──→ [staging_table] ──→ [analytics_table] ──→ [Revenue Dashboard]
[source_table_2] ──┘                                        └──→ [daily_export]

Structured list

For larger or more complex lineage:

markdown
### Upstream (sources for analytics_table)

| Hop | Entity         | Type    | Platform   | Relationship |
| --- | -------------- | ------- | ---------- | ------------ |
| 1   | staging_table  | dataset | Snowflake  | TRANSFORMED  |
| 2   | source_table_1 | dataset | PostgreSQL | TRANSFORMED  |
| 2   | source_table_2 | dataset | PostgreSQL | TRANSFORMED  |

### Downstream (consumers of analytics_table)

| Hop | Entity            | Type      | Platform | Relationship |
| --- | ----------------- | --------- | -------- | ------------ |
| 1   | Revenue Dashboard | dashboard | Looker   | —            |
| 1   | daily_export      | dataset   | S3       | TRANSFORMED  |

Impact analysis format

For impact analysis, group by entity type, identify critical paths (single-dependency chains), and list affected owners. See templates/impact-analysis.template.md for the full template.

Cross-platform view

Group by platform when lineage crosses systems:

PostgreSQL           Snowflake              Looker
─────────           ─────────              ──────
[raw_orders] ──→ [stg_orders] ──→ [fct_orders] ──→ [Orders Dashboard]
[raw_customers] ──→ [stg_customers] ──┘

Suggesting Next Steps

After presenting lineage:

  • "Want to see metadata details for any of these?" → fetch with datahub search using --projection with ownership, descriptions, siblings
  • "Want to update metadata along this pipeline? Use /datahub-enrich"
  • "Want to run an impact audit? Use /datahub-audit"

Reference Documents

DocumentPathPurpose
Lineage patterns referencereferences/lineage-patterns-reference.mdTraversal strategies and patterns
Impact analysis templatetemplates/impact-analysis.template.mdImpact analysis report template
Lineage map templatetemplates/lineage-map.template.mdLineage visualization template
CLI reference (shared)../shared-references/datahub-cli-reference.mdCLI commands

Common Mistakes

  • Using datahub get --aspect upstreamLineage instead of datahub lineage. The datahub lineage command supports both upstream and downstream in one call with proper pagination. Use it instead of the raw aspect fetch.
  • Showing only URNs. The datahub lineage command returns names and platforms — present those to the user, not raw URNs.
  • Answering metadata questions instead of tracing. "Who owns X?" is a Search question, not a Lineage question. Lineage is for relationships between entities, not entity properties.

Red Flags

  • User input contains shell metacharacters → reject, do not pass to CLI.
  • Traversal depth > 3 hops → confirm with user before proceeding.
  • Lineage returns 0 edges → entity may not have lineage ingested. Note this rather than saying "no dependencies."
  • User asks about metadata, not lineage ("who owns X?", "add a tag") → redirect to /datahub-search or /datahub-enrich.

URN Parsing

Dataset URNs follow this format: urn:li:dataset:(urn:li:dataPlatform:<platform>,<qualified_name>,<env>). Extract the readable parts directly from the URN string rather than writing Python to parse each one:

  • Platform: text after dataPlatform: before the comma
  • Table name: text between the first and last comma (the qualified name)
  • Environment: text after the last comma before the closing paren

For dashboard/chart URNs: urn:li:<type>:(<platform>,<id>).

Present lineage results using names extracted from URNs directly. Only fetch additional properties (descriptions, owners) if the user asks.

Remember

  • Show the flow visually. ASCII diagrams are more intuitive than tables for small graphs.
  • Check siblings. Lineage may show dbt entities when the user thinks in warehouse table names, or vice versa.
  • Enrich when asked. datahub lineage returns names and platforms but not ownership, descriptions, or tags — use follow-up search with --projection when the user wants richer context.
  • Check for capped results. If the summary indicates truncation, increase --count.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Datahub Lineage?

Use this skill when the user wants to explore lineage, trace data dependencies, perform impact analysis, find root causes, map data pipelines, or understand how data flows between systems. Triggers on: "what feeds into X", "what depends on X", "show lineage for X", "impact analysis", "trace the pipeline", "root cause", "upstream of X", "downstream of X", or any request involving data lineage and dependency tracking.

Firwat Datahub Lineage op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Datahub Lineage besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Datahub Lineage an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/datahub-project/datahub-skills/tree/main/skills/datahub-lineage an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Datahub Lineage benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Datahub Lineage benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Datahub Lineage domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Datahub Lineage gratis?

Jo. datahub-project huet de Skill ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇