New advertisers: 50% off your first month with code FIRSTMONTHSee slots
astronomer avatar

Tracing Upstream Lineage

Step-by-step method for tracing where a table, column, or DAG gets its data from upstream.

skills.sh installs
1.1K
GitHub stars
463
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers three target types: tables, columns, and DAGs, each with its own tracing path
  • Finds producing DAGs by name match, DAG source code (af dags source), and task lists (af tasks list)
  • Identifies upstream SQL sources, external systems such as S3, Postgres, Salesforce, and REST APIs, and file drops
  • Designed for Airflow users, with Astro's Lineage tab noted as a visual option and OSS Airflow relying on source code

Install

$ npx -y skills add astronomer/agents --skill tracing-upstream-lineage -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Upstream Lineage: Sources

Trace the origins of data - answer "Where does this data come from?"

Lineage Investigation

Step 1: Identify the Target Type

Determine what we're tracing:

  • Table: Trace what populates this table
  • Column: Trace where this specific column comes from
  • DAG: Trace what data sources this DAG reads from

Step 2: Find the Producing DAG

Tables are typically populated by Airflow DAGs. Find the connection:

  1. Search DAGs by name: Use af dags list and look for DAG names matching the table name

    • load_customers -> customers table
    • etl_daily_orders -> orders table
  2. Explore DAG source code: Use af dags source <dag_id> to read the DAG definition

    • Look for INSERT, MERGE, CREATE TABLE statements
    • Find the target table in the code
  3. Check DAG tasks: Use af tasks list <dag_id> to see what operations the DAG performs

On Astro

If you're running on Astro, the Lineage tab in the Astro UI provides visual lineage exploration across DAGs and datasets. Use it to quickly trace upstream dependencies without manually searching DAG source code.

On OSS Airflow

Details

Repository
github.com/astronomer/agents
Categories
Data Science & Analytics, Databases, Debugging
First seen
Apr 16, 2026

More from astronomer/agents

All 24

Similar to Tracing Upstream Lineage

More Data Science & Analytics