skills/astronomer/tracing-downstream-lineage/SKILL.md
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.
npx skillsauth add rory-data/copilot tracing-downstream-lineageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Answer the critical question: "What breaks if I change this?"
Use this BEFORE making changes to understand the blast radius.
Find everything that reads from this target:
For Tables:
Search DAG source code: Look for DAGs that SELECT from this table
af dags list to get all DAGsaf dags source <dag_id> to search for table referencesFROM target_table, JOIN target_tableCheck for dependent views:
-- Snowflake
SELECT * FROM information_schema.view_table_usage
WHERE table_name = '<target_table>'
-- Or check SHOW VIEWS and search definitions
Look for BI tool connections:
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:
af dags source <dag_id> to find output tablesMap 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"
Critical (breaks production):
High (causes significant issues):
Medium (inconvenient):
Low (minimal impact):
For the proposed change, evaluate:
Schema Changes (adding/removing/renaming columns):
Data Changes (values, volumes, timing):
Deletion/Deprecation:
Identify who owns downstream assets:
owners field in DAG definitions"Changing fct.orders will impact X tables, Y DAGs, and Z dashboards"
+--> [agg.daily_sales] --> [Executive Dashboard]
|
[fct.orders] -------+--> [rpt.order_details] --> [Ops Team Email]
|
+--> [ml.features] --> [Demand Model]
| 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 |
| 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 |
Before making changes:
transform_daily_salestools
Queries, manages, and troubleshoots Apache Airflow using the af CLI. Covers listing DAGs, triggering runs, reading task logs, diagnosing failures, debugging DAG import errors, checking connections, variables, pools, and monitoring health. Also routes to sub-skills for writing DAGs, debugging, deploying, and migrating Airflow 2 to 3. Use when user mentions "Airflow", "DAG", "DAG run", "task log", "import error", "parse error", "broken DAG", or asks to "trigger a pipeline", "debug import errors", "check Airflow health", "list connections", "retry a run", or any Airflow operation. Do NOT use for warehouse/SQL analytics on Airflow metadata tables — use analyzing-data instead.
tools
Build Airflow 3.1+ plugins that embed FastAPI apps, custom UI pages, React components, middleware, macros, and operator links directly into the Airflow UI. Use this skill whenever the user wants to create an Airflow plugin, add a custom UI page or nav entry to Airflow, build FastAPI-backed endpoints inside Airflow, serve static assets from a plugin, embed a React app in the Airflow UI, add middleware to the Airflow API server, create custom operator extra links, or call the Airflow REST API from inside a plugin. Also trigger when the user mentions AirflowPlugin, fastapi_apps, external_views, react_apps, plugin registration, or embedding a web app in Airflow 3.1+. If someone is building anything custom inside Airflow 3.1+ that involves Python and a browser-facing interface, this skill almost certainly applies.
data-ai
Use when the user needs human-in-the-loop workflows in Airflow (approval/reject, form input, or human-driven branching). Covers ApprovalOperator, HITLOperator, HITLBranchOperator, HITLEntryOperator, HITLTrigger. Requires Airflow 3.1+. Does not cover AI/LLM calls (see airflow-ai).
development
Detects and fixes common code smells during review or refactoring. Invoke whenever reviewing code for quality issues, before merging a PR, when refactoring legacy code, or when the user asks about code quality, anti-patterns, or technical debt. Detects: over-abstraction, complex inheritance, large functions, tight coupling, hidden dependencies, magic numbers, boolean traps, swallowed exceptions, global state, and duplicate code. Provides specific fixes with before/after examples. Also invoke when someone says "review this code", "is this clean?", "can I improve this?", "this feels messy", or "find problems in my code".