Skip to main content
skill CX Codex

tracing-downstream-lineage — Claude Code skill: impact analysis

The skill finds everything downstream of a table or DAG and shows what breaks when you change it. Run it before touching a schema.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add astronomer/agents --skill tracing-downstream-lineage -a claude-code
Open on GitHub

What tracing-downstream-lineage does

This skill answers one question: what breaks if I change this? It looks for direct consumers of the target — DAGs that read from the table, dependent views, BI tool connections. For a DAG it first finds the tables that DAG produces, then traces their consumers recursively.

From there it builds a dependency tree and sorts it by criticality. Production dashboards and customer-facing apps land in one bucket, ad-hoc analysis tables in another. Change risk gets its own pass: adding a column, renaming one, deleting one, switching a data type. The output is an impact table with owners and a checklist of actions to take before the change.

Consumer search runs through af dags list and af dags source <dag_id>, so you need access to your Airflow and the CLI configured. When a dashboard queries a table directly instead of going through a DAG, the skill looks for naming patterns like rpt_ or dashboard_. On Astro the Lineage tab in the UI draws dependency graphs across DAGs and datasets, which saves the manual source search.

What it helps with

  • see what breaks when you drop a column
  • find every DAG and dashboard reading one table
  • size up the risk of renaming a field before you touch it
  • collect downstream asset owners to notify
  • rank dependencies by criticality ahead of a migration

Example prompts for the agent

  • what breaks if I rename a column in fct.orders?
  • show downstream dependencies of agg.daily_sales
  • which dashboards read from ml.order_features?

How to install tracing-downstream-lineage

1Skills CLI (Vercel)

npx skills add astronomer/agents --skill tracing-downstream-lineage -a claude-code

2Manually: put the files in place

~/.claude/skills/tracing-downstream-lineage/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/tracing-downstream-lineage/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about tracing-downstream-lineage

How do I install tracing-downstream-lineage in Claude?

Run npx skills add astronomer/agents --skill tracing-downstream-lineage -a claude-code. The skill lands in ~/.claude/skills/tracing-downstream-lineage/SKILL.md.

What does tracing-downstream-lineage do?

It finds everything downstream of a table or DAG, builds a dependency tree and assesses change risk. You get a report with criticality, owners and a list of actions.

What does the skill need to run?

Access to your Airflow and the af CLI configured — that is how the skill pulls the DAG list and their source code.

Source text

SKILL.md · Apache-2.0
---
name: tracing-downstream-lineage
description: Trace downstream data lineage and impact analysis. Use when the user asks what depends on this data, what breaks if something changes, downstream dependencies, or needs to assess change risk before modifying a table or DAG.
---

# Downstream Lineage: Impacts

Answer the critical question: "What breaks if I change this?"

Use this BEFORE making changes to understand the blast radius.

## Impact Analysis

### Step 1: Identify Direct Consumers

Find everything that reads from this target:

**For Tables:**

1. **Search DAG source code**: Look for DAGs that SELECT from this table
   - Use `af dags list` to get all DAGs
   - Use `af dags source <dag_id>` to search for table references
   - Look for: `FROM target_table`, `JOIN target_table`

2. **Check for dependent views**:
   ```sql
   -- Snowflake
   SELECT * FROM information_schema.view_table_usage
   WHERE table_name = '<target_table>'

   -- Or check SHOW VIEWS and search definitions
   ```

3. **Look for BI tool connections**:
   - Dashboards often query tables directly
   - Check for common BI patterns in table naming (rpt_, dashboard_)

### On Astro

If you're running on Astro, the **Lineage tab** in the Astro UI provides visual dependency graphs across DAGs and datasets, making downstream impact analysis faster. It shows which DAGs consume a given dataset and their current status, reducing the need for manual source code searches.

**For DAGs:**

1. **Check what the DAG produces**: Use `af dags source <dag_id>` to find output tables
2. **Then trace those tables' consumers** (recursive)

### Step 2: Build Dependency Tree

Map the full downstream impact:

```
SOURCE: fct.orders
    |
    +-- TABLE: agg.daily_sales --> Dashboard: Executive KPIs
    |       |
    |       +-- TABLE: rpt.monthly_summary --> Email: Monthly Report
    |
    +-- TABLE: ml.order_features --> Model: Demand Forecasting
    |
    +-- DIRECT: Looker Dashboard "Sales Overview"
```

### Step 3: Categorize by Criticality

**Critical** (breaks production):
- Production dashboards
- Customer-facing applications
- Automated reports to executives
- ML models in production
- Regulatory/compliance reports

**High** (causes significant issues):
- Internal operational dashboards
- Analyst workflows
- Data science experiments
- Downstream ETL jobs

**Medium** (inconvenient):
- Ad-hoc analysis tables
- Development/staging copies
- Historical archives

**Low** (minimal impact):
- Deprecated tables
- Unused datasets
- Test data

### Step 4: Assess Change Risk

For the proposed change, evaluate:

**Schema Changes** (adding/removing/renaming columns):
- Which downstream queries will break?
- Are there SELECT * patterns that will pick up new columns?
- Which transformations reference the changing columns?

**Data Changes** (values, volumes, timing):
- Will downstream aggregations still be valid?
- Are there NULL handling assumptions that will break?
- Will timing changes affect SLAs?

**Deletion/Deprecation**:
- Full dependency tree must be migrated first
- Communication needed for all stakeholders

### Step 5: Find Stakeholders

Identify who owns downstream assets:

1. **DAG owners**: Check `owners` field in DAG definitions
2. **Dashboard owners**: Usually in BI tool metadata
3. **Team ownership**: Look for team naming patterns or documentation

## Output: Impact Report

### Summary
"Changing `fct.orders` will impact X tables, Y DAGs, and Z dashboards"

### Impact Diagram
```
                    +--> [agg.daily_sales] --> [Executive Dashboard]
                    |
[fct.orders] -------+--> [rpt.order_details] --> [Ops Team Email]
                    |
                    +--> [ml.features] --> [Demand Model]
```

### Detailed Impacts

| Downstream | Type | Criticality | Owner | Notes |
|------------|------|-------------|-------|-------|
| agg.daily_sales | Table | Critical | data-eng | Updated hourly |
| Executive Dashboard | Dashboard | Critical | analytics | CEO views daily |
| ml.order_features | Table | High | ml-team | Retraining weekly |

### Risk Assessment

| Change Type | Risk Level | Mitigation |
|-------------|------------|------------|
| Add column | Low | No action needed |
| Rename column | High | Update 3 DAGs, 2 dashboards |
| Delete column | Critical | Full migration plan required |
| Change data type | Medium | Test downstream aggregations |

### Recommended Actions

Before making changes:
1. [ ] Notify owners: @data-eng, @analytics, @ml-team
2. [ ] Update downstream DAG: `transform_daily_sales`
3. [ ] Test dashboard: Executive KPIs
4. [ ] Schedule change during low-impact window

### Related Skills
- Trace where data comes from: **tracing-upstream-lineage** skill
- Check downstream freshness: **checking-freshness** skill
- Debug any broken DAGs: **debugging-dags** skill
- Add manual lineage annotations: **annotating-task-lineage** skill
- Build custom lineage extractors: **creating-openlineage-extractors** skill

© astronomer · Apache-2.0 · astronomer/agents

Similar skills

All skills for Data and databases →

From the same set24

authoring-dags Guides the creation and validation of Apache Airflow DAGs across a six-phase workflow. Useful when writing new data pipelines or adding downstream tasks to existing DAGs. CX Codex +1 1,200installs setting-up-astro-project A skill that walks the agent through creating an Airflow project with the Astro CLI: folder layout, dependencies, connections and variables. CX Codex +1 1,100installs migrating-airflow-2-to-3 Walks Airflow 2.x DAG code through the move to 3.x: imports, operators, hooks, metadata access. Useful when the upgrade is due and hunting breaking changes by hand is tedious. CX Codex +1 1,100installs checking-freshness The skill checks when a table was last updated and tells you whether the data is safe to use. CX Codex +1 1,000installs profiling-tables Profiles specific database tables through targeted SQL queries. It inspects schema, gathers column statistics, and evaluates data quality. CX Codex +1 1,000installs tracing-upstream-lineage A skill that answers "where does this data come from" by finding the producing DAG, reading its source and walking the chain back to external systems. CX Codex +1 1,000installs cosmos-dbt-core Turns a dbt Core project into an Airflow DAG or TaskGroup with Astronomer Cosmos. Useful when your models need a schedule and retries. CX Codex +1 962installs airflow-hitl A skill for building human-in-the-loop Airflow workflows: approval gates, form input, and branching on a person's choice. Useful when a DAG has to wait for a response. CX Codex +1 952installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor