Know what breaks before you break it.
AI-powered schema change impact analysis using DataHub Lineage and LLMs.
Schema evolution is one of the most common causes of production incidents in modern data platforms.
Data ecosystems are deeply interconnected β a single table feeds dashboards, ETL pipelines, ML models, and downstream datasets. When an engineer modifies a schema, they often have zero visibility into what will break:
| Without Impact Analysis | With DataHub Impact Analyzer |
|---|---|
| "Which dashboards will break?" | Instantly identifies all affected dashboards |
| "Which ETL pipelines will fail?" | Maps every downstream pipeline dependency |
| "Who do I notify?" | Surfaces asset owners for immediate outreach |
| "How severe is this change?" | Classifies risk into Critical / High / Low |
| "What should I do next?" | AI-generated recommendations & action steps |
DataHub Impact Analyzer connects to your DataHub instance, traverses the lineage graph for any table, and produces a comprehensive impact report β complete with severity classifications and AI-generated explanations β in seconds.
Engineer submits schema change β Lineage graph traversed β Impact classified β AI explains risks
Works without any API keys. If no OpenAI key is configured, the system gracefully falls back to template-based explanations with zero loss of functionality.
Try it yourself in 60 seconds:
git clone https://github.com/Siteshcodes/DataHub-Impact-Analyzer.git
cd DataHub-Impact-Analyzer
docker compose up --build
# Open http://localhost:8000Sample Input:
| Field | Value |
|---|---|
| Table URN | snowflake:prod.analytics.user_events |
| Schema Change | DROP COLUMN user_id |
Sample Output:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CRITICAL Γ2 β HIGH Γ1 β LOW Γ1 β
β Dashboards β Pipeline β Staging Table β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β AI Explanation: β
β "Dropping user_id will break primary key joins in the β
β Executive Analytics dashboard and User Retention dashboard. β
β The Daily User ETL pipeline will fail on its lookup step." β
β β
β Recommendation: β
β "Notify analytics-team@company.com before proceeding. β
β Consider a staged rollout with monitoring." β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Feature | Description |
|---|---|
| Schema Change Parsing | Supports DROP COLUMN, ADD COLUMN, and ALTER COLUMN with regex-based extraction |
| DataHub Lineage Traversal | Fetches all downstream dependencies directly from DataHub's lineage graph |
| Severity Classification | Auto-classifies impact as Critical (dashboards), High (pipelines), or Low (tables) |
| AI-Powered Explanations | GPT-4o-mini generates clear, contextual summaries with actionable recommendations |
| Template Fallback | Full functionality without an API key β template engine produces structured explanations |
| Asset Ownership Detection | Identifies owners of every affected downstream asset for notification |
| Dual-Mode DataHub | Seamlessly switches between live DataHub GMS and high-fidelity mock data |
| Pydantic Validation | Strict request/response validation with detailed error messages |
| Containerized Deployment | One-command start with Docker Compose |
| Comprehensive Test Suite | Full pytest coverage across all services |
| π DataHub Skills Integration | Five integrated skills β Search, Lineage, Enrich, Quality, Setup β with a premium dark-mode dashboard |
This project integrates all five DataHub Skills directly into the web UI, transforming the Impact Analyzer into a full-featured DataHub agent dashboard.
| Skill | Endpoint | What it does |
|---|---|---|
| Search | POST /api/skills/search |
Find data assets using descriptions, glossary terms, ownership, usage, and quality signals |
| Lineage | POST /api/skills/lineage |
Trace upstream sources, transformations, and downstream consumers with interactive graph |
| Enrich | POST /api/skills/enrich |
Add descriptions, tags, glossary terms, owners, domains with before/after diff preview |
| Quality | POST /api/skills/quality |
Monitor assertions (freshness, volume, schema), investigate incidents, view health scores |
| Setup | POST /api/skills/setup |
Configure and test your DataHub connection (Cloud or self-hosted) |
Skills vs. Tools: Skills give agents instructions β how to chain multiple API calls into multi-step workflows with the right judgment at each step. The Skills dashboard lets you run these same workflows from a visual interface.
flowchart TB
subgraph Client
User([π€ Engineer]) --> Frontend[π₯οΈ Skills Dashboard]
end
subgraph Backend ["FastAPI Backend"]
direction TB
API["/api/analyze"] --> Parser["Schema Parser"]
Parser --> DHClient["DataHub Client"]
DHClient --> Analyzer["Impact Analyzer"]
Analyzer --> LLM["LLM Agent"]
LLM --> Response["Response Builder"]
SkillsAPI["/api/skills/*"] --> SkillsSvc["Skills Service"]
end
subgraph External ["External Services"]
DataHub[(DataHub GMS)]
OpenAI[OpenAI API]
end
Frontend -- "POST {table_urn, schema_change}" --> API
Frontend -- "POST skills/search|lineage|enrich|quality|setup" --> SkillsAPI
DHClient -- "Lineage Query" --> DataHub
SkillsSvc -- "Search / Lineage / Enrich / Quality" --> DataHub
LLM -- "Prompt" --> OpenAI
Response -- "JSON Impact Report" --> Frontend
1. Submit β User enters table URN + schema change (e.g., DROP COLUMN user_id)
2. Validate β Pydantic validates URN format and operation syntax
3. Parse β Regex parser extracts operation type, target column, and types
4. Traverse β DataHub client walks the lineage graph for downstream assets
5. Classify β Impact analyzer assigns severity by asset type
6. Explain β LLM (or template fallback) generates human-readable summary
7. Respond β Structured JSON response rendered on the interactive dashboard
- Docker & Docker Compose
- (Optional) An OpenAI API key for AI-powered explanations
git clone https://github.com/Siteshcodes/DataHub-Impact-Analyzer.git
cd DataHub-Impact-Analyzer
cp .env.example .envdocker compose up --buildNavigate to http://localhost:8000 and run your first analysis.
Tip
The app ships with mock DataHub data enabled by default (USE_MOCK_DATA=true), so you can explore the full workflow immediately β no DataHub instance required.
All configuration is managed via environment variables in .env:
| Variable | Default | Required | Description |
|---|---|---|---|
DATAHUB_SERVER |
http://localhost:8080 |
No | DataHub GMS server URL |
DATAHUB_TOKEN |
β | No | Authentication token for DataHub |
OPENAI_API_KEY |
β | No | OpenAI API key for AI explanations (falls back to templates) |
USE_MOCK_DATA |
true |
No | Use built-in mock lineage data instead of a live DataHub instance |
Analyze the downstream impact of a schema change.
Request Body
{
"table_urn": "snowflake:prod.analytics.user_events",
"schema_change": "DROP COLUMN user_id"
}| Field | Type | Validation | Description |
|---|---|---|---|
table_urn |
string |
URN format: urn:li:dataset:... or platform:db.schema.table |
Target table identifier |
schema_change |
string |
Must start with DROP, ADD, or ALTER |
Schema modification statement |
Success Response (200)
{
"table_urn": "snowflake:prod.analytics.user_events",
"schema_change": "DROP COLUMN user_id",
"total_affected": 4,
"severity_counts": {
"critical": 2,
"high": 1,
"low": 1
},
"affected_assets": [
{
"urn": "urn:li:dashboard:(tableau,user_analytics)",
"name": "Executive User Analytics Dashboard",
"type": "dashboard",
"severity": "CRITICAL",
"owner": "analytics-team@company.com",
"reason": "May reference column 'user_id'"
}
],
"explanation": "Dropping 'user_id' will break 2 downstream dashboards..."
}Error Response (400 / 500)
{
"error": "Invalid table URN format",
"details": "Expected format: 'urn:li:dataset:...' or 'platform:database.schema.table'"
}Returns service health status.
{ "status": "healthy", "version": "1.0.0" }Run the full test suite:
cd backend
pytest -v| Module | Tests Cover |
|---|---|
| API Endpoints | Request validation, error handling, response structure |
| Schema Parser | DROP, ADD, ALTER operations + edge cases |
| DataHub Client | Lineage resolution with mock & live modes |
| Impact Analyzer | Severity classification, affected asset detection |
| LLM Agent | Prompt construction, template fallback, error handling |
| Layer | Technology | Why |
|---|---|---|
| API Framework | FastAPI | Async-first, auto-generated OpenAPI docs, Pydantic integration |
| Runtime | Python 3.11 | Modern type hints, performance improvements |
| Metadata Platform | DataHub (acryl-datahub SDK) | Industry-standard lineage graph and metadata catalog |
| AI / LLM | OpenAI GPT-4o-mini | Cost-effective, fast, high-quality natural language generation |
| Validation | Pydantic v2 | Runtime type checking with detailed error messages |
| Frontend | HTML5 / CSS3 / JavaScript | Lightweight, zero-dependency interactive UI |
| Deployment | Docker Compose | Single-command multi-container orchestration |
| Testing | pytest + pytest-asyncio + httpx | Async-compatible test framework with HTTP client |
DataHub-Impact-Analyzer/
βββ backend/
β βββ app/
β β βββ api/ # FastAPI route handlers
β β βββ models/
β β β βββ schemas.py # Pydantic request/response models
β β βββ services/
β β β βββ schema_parser.py # SQL schema change parser
β β β βββ datahub_client.py # DataHub lineage client (mock + live)
β β β βββ impact_analyzer.py# Severity classification engine
β β β βββ llm_agent.py # OpenAI integration + template fallback
β β βββ utils/ # Logger, config, helpers
β β βββ main.py # FastAPI app entry point
β βββ tests/ # Comprehensive pytest suite
β βββ requirements.txt
β βββ Dockerfile
β βββ pytest.ini
β
βββ frontend/
β βββ index.html # Main UI
β βββ styles.css # Styling
β βββ app.js # Client-side logic
β
βββ ARCHITECTURE.md # Architecture design document
βββ .env.example # Environment template
βββ docker-compose.yml # Container orchestration
βββ LICENSE
βββ README.md
The application is engineered for production-grade resilience, even in a hackathon context:
| Capability | How It Works |
|---|---|
| Dual-Mode DataHub | Seamless switching between live GMS and high-fidelity mock lineage β no config changes needed |
| AI Fallback System | Automatic failover to template-based explanations when OpenAI is unavailable or rate-limited |
| Strict Validation | Pydantic v2 validates every request and response at runtime with descriptive error messages |
| Modular Architecture | Decoupled services with dependency injection for isolated testing and easy extension |
| Cache-Control Headers | Static assets served with proper Cache-Control for optimal browser caching |
| Structured Logging | Consistent timestamp - logger - level - message format across all components |
| Health Endpoint | GET /health for container orchestration readiness checks |
Built for Build with DataHub: The Agent Hackathon
| Criteria | How We Deliver |
|---|---|
| Use of DataHub | Deep integration with DataHub's lineage graph API for automated downstream impact discovery |
| Technical Execution | Full-stack implementation β async backend, interactive frontend, comprehensive test suite |
| Real-World Value | Prevents breaking schema changes in production data platforms before they reach deployment |
| AI Integration | GPT-4o-mini generates contextual, actionable impact explanations with graceful fallback |
- β Interactive Lineage Graph β Visual graph exploration embedded in the frontend (shipped!)
- β DataHub Skills Integration β Search, Lineage, Enrich, Quality, Setup (shipped!)
- β¬ Column-Level Lineage β Pinpoint exact field usage in SQL views and dashboard queries
- β¬ MCP Server Integration β Enable AI agents (Claude Desktop, Cursor) to run impact analysis
- β¬ Slack & Email Alerts β Automated notification dispatch to asset owners via webhooks
- β¬ Multi-Change Analysis β Batch analysis of multiple schema changes in a single request
- β¬ Historical Impact Tracking β Audit log of past analyses for compliance and review
Contributions are welcome! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'Add your feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
Please ensure all tests pass before submitting:
cd backend && pytest -vDistributed under the Apache License 2.0. See LICENSE for details.
Sitesh Gupta
Built with β and a passion for preventing production incidents.
