Automating Regulatory Data Call Query Migration with AI-Driven SQL Mapping on Databricks

Automating Regulatory Data Call Query Migration with AI-Driven SQL Mapping on Databricks

A leading US insurance carrier needed to migrate more than 100 regulatory data call queries from legacy SQL Server warehouses into its Helix Business Data Warehouse (BDW). The process depended on manual SQL analysis and field-by-field mapping across 60 operating units, which was slow and hard to scale.

Client Challenges and Requirements

  • Connectivity gaps: Legacy SQL Server systems could not easily connect to the Databricks cloud environment.
  • Mapping ambiguity: Multi-valued, delimiter-based fields caused partial matches.
  • Missing cross-references: Legacy field descriptions had no link to the target Helix BDW descriptions.
  • Incomplete migration: Certain Data Call attributes had never been fully loaded into BDW.
  • AI model limitations: Complex, lengthy SQL scripts caused models to lose context continuity.

Bitwise Solution

  • Applied AI/LLM automation on Databricks to parse, map, and generate SQL across 100+ regulatory data calls.
  • Ingested legacy data into Unity Catalog, with an LLM SQL parser extracting table and field relationships.
  • Matched fields against Unity Catalog target tables through a destination search engine, using multiple methods and confidence scoring.
  • Extracted data securely from SQL Server into Databricks Delta tables over JDBC, authenticated via Azure AD.
  • Added human-in-the-loop (HITL) validation of low-confidence mappings before generating production-ready SQL.
  • Evaluated multiple LLMs on Databricks, including Llama 3.1, Claude Sonnet 4.5, Claude Opus 4.1, and Gemini 3 Pro.
  • Automated the flow end to end:
    • Data ingestion into Unity Catalog volumes, then LLM SQL parsing.
    • Data sampling and destination search, using view hints to suggest target schema locations.
    • Matching strategies with a brute-force catalog search fallback, then confidence scoring.
    • HITL preparation and validation, then SQL generation and data validation.

Tools & Technologies We Used

Databricks

Unity Catalog

Delta Lake

Databricks Notebooks

Claude Sonnet 4.5 (LLM)

PySpark

Azure AD

JDBC

SQL Server (Legacy BDW)

Data.World

Python

GitHub

Key Results

Achieved 78% attribute coverage (221 of 284) through existing and AI-suggested mappings.

Mapped 40% of attributes from existing mappings and 38% through AI suggestions, sharply cutting manual field-mapping effort.

Reduced execution and reporting effort by 40 to 60%.

Reduced manual SQL analysis through AI-driven parsing, matching, and HITL review.

Governed 60 operating units through Unity Catalog tables, volumes, and role-based access control.

Share

Download Case Study

Let's Engineer Your AI Advantage

Automating Regulatory Data Migration with AI | Databricks