Inspiration 💡

Data engineering teams push dbt models and SQL schema changes daily. However, when a developer drops or renames a column in a pull request, standard CI checks only verify SQL syntax — they are completely blind to data catalog context. This leads to silent production outages, broken Looker revenue dashboards, and crashed SageMaker ML pipelines. We built BlastRadius to give AI agents complete DataHub graph context to evaluate column-level blast radius and protect data stacks before PRs merge.

What it does ⚡

BlastRadius operates as an AI agent, GitHub Action, and installable DataHub Agent Skill that performs automated PR risk reviews:

  • SQL AST Diff Resolver: Uses SQLGlot to extract exact column modifications (COLUMN_DROP, RENAME, TYPE_CHANGE).
  • Column-Level Lineage Traversal: Queries DataHub GMS to trace downstream dependencies (BI charts, executive dashboards, ML features, production ML models).
  • Data Contract Assertion Guard: Evaluates PR column changes against active DataHub data contract assertions (VIOLATED vs PASSED).
  • MCP Agent Enrichment: Connects over stdio to mcp-server-datahub to enrich risk narratives with catalog descriptions and explicit transformation paths.
  • Auditable Scoring & PR Reporting: Calculates transparent 0–100 point risk verdicts and posts GitHub PR comments with required cross-team owner callouts.
  • Two-Way Catalog Write-Back: Annotates affected downstream assets with blastradius_pending_change tags and updates dataset descriptions using plain-text sentinel warning blocks ([BLASTRADIUS:START]).
  • Reversible Cleanup: Restores original DataHub metadata byte-for-byte when PRs close or merge.

How we built it 🏗️

  • Language & Core Engine: Python 3.12, SQLGlot AST parser, and acryl-datahub SDK.
  • Agent Layer: Connected over stdio to mcp-server-datahub utilizing dynamic tool invocation (get_entities, get_lineage_paths_between, add_tags, update_description, add_structured_properties).
  • Agent Skill Packaging: Formatted as an installable DataHub Agent Skill (skills/blastradius-guardian/SKILL.md) compatible with Gemini CLI, Claude Code, Cursor, and Copilot.
  • CI/CD Integration: Packaged into a ready-to-use GitHub Action workflow (.github/workflows/blastradius.yml).

Challenges we ran into 🧠

  1. DataHub HTML Sanitization: GMS sanitizers stripped standard HTML comment tags (<!-- BLASTRADIUS:START -->). We solved this by designing visible, markdown-safe plain-text delimiters ([BLASTRADIUS:START]) that persist 100% reliably in GMS.
  2. Byte-for-Byte Restoration: Ensuring reversible cleanup stripped warning blocks cleanly without leaving blank fields or leftover newlines.
  3. Offline Telemetry Timeout: Disabling telemetry retries (DATAHUB_TELEMETRY_ENABLED=false) allowed stdio MCP server startup to be instantaneous under offline cached environments.

Accomplishments that we're proud of 🏆

  • Zero Shortcuts: 100% verified live against local DataHub Core (http://localhost:8080).
  • Real Two-Way Agent Execution: The agent doesn't just read metadata — it takes action, writing warning tags, sentinel descriptions, and structured properties directly back into DataHub.
  • Zero-Setup Offline Fallback Mode: Features a standalone demo mode (python -m blastradius.demo) using recorded fixtures.

What we learned 📚

Deepened our understanding of DataHub's metadata graph model, fine-grained column lineage APIs, schema assertion contracts, and Model Context Protocol (MCP) stdio server mechanics.

What's next for BlastRadius 🚀

  • Automated PR Auto-Remediation: Generating dbt alias migration models automatically for dropped columns.
  • Real-Time Slack Alerts: Dispatching instant notifications to affected downstream asset owners when high-risk PRs are opened.

Built With

Share this project:

Updates