Chapter 4

Impact Analysis

Impact analysis answers the critical question: "What will break if I make this change?" By leveraging data lineage, teams can proactively identify downstream dependencies and prevent catastrophic failures before they happen.

What is Impact Analysis?

Impact analysis uses lineage graphs to trace all downstream consumers of a data asset. When you plan to modify a table, column, or transformation, impact analysis shows you every report, dashboard, ML model, and data pipeline that depends on it.

Core Principle: Better to discover breaking changes during planning than during a production outage at 3am.

Types of Changes to Analyze

1. Schema Changes

2. Business Logic Changes

3. Infrastructure Changes

Real-World Scenario

Situation: Your team wants to rename customer_id to user_id for consistency.

Without Impact Analysis: Deploy the change → 47 dashboards break → 12 ETL jobs fail → ML model predictions stop → executive dashboard is down → emergency rollback → lost productivity and trust.

With Impact Analysis: Run analysis → identify 47 downstream dependencies → create migration plan → update consumers in stages → deploy safely → zero downtime.

Performing Impact Analysis

Step 1: Identify the Change

Target: warehouse.customers.email_address
Change Type: Column rename
New Name: contact_email
Reason: Standardization

Step 2: Query Lineage Graph

SELECT DISTINCT
    downstream_table,
    downstream_column,
    transformation_type,
    owner
FROM lineage_metadata
WHERE upstream_table = 'warehouse.customers'
  AND upstream_column = 'email_address'
ORDER BY depth DESC;

Step 3: Analyze Results

Found 23 downstream dependencies:

DIRECT DEPENDENCIES (Depth 1):
  ✓ analytics.customer_summary.email
  ✓ reports.marketing_list.contact_email
  ✓ ml_features.customer_attributes.email_domain

INDIRECT DEPENDENCIES (Depth 2):
  ⚠ dashboards.executive_overview (via customer_summary)
  ⚠ ml_models.churn_predictor (via customer_attributes)

CRITICAL DEPENDENCIES:
  ⛔ real_time_api.customer_lookup (SLA: <100ms)

Step 4: Risk Assessment

Step 5: Migration Planning

  1. Add new column while keeping old (deprecation period)
  2. Update non-critical consumers first
  3. Update critical systems during maintenance window
  4. Remove old column after validation period

Automated Impact Analysis

Example: CI/CD Integration
# Pre-deployment impact check
name: Impact Analysis
on: pull_request

jobs:
  analyze-impact:
    runs-on: ubuntu-latest
    steps:
      - name: Extract schema changes
        run: |
          git diff main --name-only | grep "\.sql$" > changed_files.txt

      - name: Run impact analysis
        run: |
          python scripts/analyze_impact.py \
            --changes changed_files.txt \
            --output impact_report.md

      - name: Comment on PR
        if: impact.high_risk_count > 0
        run: |
          gh pr comment ${{ github.event.pull_request.number }} \
            --body-file impact_report.md

Impact Analysis Patterns

Forward Impact (Downstream)

Most common: "What depends on this?"

Backward Impact (Upstream)

"What does this depend on?"

Lateral Impact (Same Level)

"What else uses the same source?"

Impact Metrics

Quantify the blast radius of changes:

Advanced Techniques

What-If Analysis

Model hypothetical changes before making them:

WHAT IF we delete staging.temp_customer_data?
  → orphans: analytics.customer_360 (broken)
  → requires: new source for customer_360
  → estimated migration: 16 hours

Blast Radius Visualization

Visual representation of impact scope:

Time-Based Impact

Consider when changes take effect:

Best Practices

  1. Run Impact Analysis Early: During design, not just before deployment
  2. Automate Where Possible: Integrate with CI/CD pipelines
  3. Set Thresholds: Define acceptable impact levels
  4. Require Sign-Off: High-impact changes need stakeholder approval
  5. Document Decisions: Record why changes were deemed acceptable
  6. Plan Rollback: Always have a way to undo changes
  7. Communicate Proactively: Notify affected teams in advance
Key Takeaway: Impact analysis transforms data lineage from documentation into a proactive risk management tool. It's the difference between reactive firefighting and planned, coordinated changes.