- Home
- Skills
- Astronomer
- Agents
- Tracing Upstream Lineage
tracing-upstream-lineage_skill
- Python
251
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill astronomer/agents --skill tracing-upstream-lineage- SKILL.md4.4 KB
Overview
This skill traces upstream data lineage to answer where data comes from and what feeds a table, column, or DAG. It maps producing DAGs, source systems, and transformation chains into a concise lineage report that highlights sources, connections, and potential health issues.
How this skill works
The skill identifies the target type (table, column, or DAG), locates the producing Airflow DAGs, and inspects DAG source code and tasks for SQL and operator references. It extracts SQL FROM clauses, operator connection names (S3, Postgres, API), and file paths, then recursively follows each upstream source to build a lineage chain. The output includes a one-line summary, an ASCII lineage diagram, source details, and transformation steps.
When to use it
- You need to know which DAG populates a given table or column.
- You want to list upstream systems feeding a dataset (databases, S3, APIs).
- You must audit transformation chains and understand how a value is computed.
- You need to assess upstream health or identify single points of failure.
- You are preparing impact or root-cause analysis for data issues.
Best practices
- Start by confirming the target type (table, column, or DAG) to narrow the search.
- Search DAG names and inspect DAG source code for INSERT/MERGE/SELECT and operator connections.
- Recursively trace each discovered source until you hit an external system or raw file.
- Annotate found connections and owners; record freshness and recent DAG run status.
- Use related checks (freshness, DAG run stats) to evaluate upstream reliability.
Example use cases
- Explain where analytics.orders_daily comes from and which DAGs feed it.
- Trace the origin and transformations behind a specific column like total_amount.
- Map all external systems and files that land data into a target table.
- Produce a lineage diagram and source detail table for a data governance review.
- Identify upstream DAG failures or stale sources causing downstream errors.
FAQ
Search DAG SQL and transformation code for direct mappings, COALESCE/CASE, aggregations, and joins; trace each contributing column back to its source and describe the transformation step.
What health checks are recommended for upstream sources?
Check table freshness, recent DAG run status, and external connection metadata; flag stale tables, failed DAG runs, and single points of failure.