AI News HubLIVE
Original source3 min read

Convert proprietary code to open ANSI SQL with the agentic code converter, now in Beta

Databricks launches the agentic code converter (Beta) using Genie Code AI to automatically convert proprietary SQL dialects (T-SQL, Snowflake, Redshift, Oracle, BigQuery, Teradata) to open ANSI SQL, with features for migration projects, complexity scoring, lineage analysis, and custom skills, dramatically simplifying legacy data warehouse migration to the Lakehouse.

Convert proprietary code to open ANSI SQL with the agentic code converter, now in Beta | Databricks Blog

Skip to main content

Now in Beta, the agentic code converter uses Genie Code to convert proprietary SQL to open ANSI SQL, launching swarms of parallel agents that iteratively convert code, validating syntax and semantic intent

Create a migration project in your Databricks workspace to track progress, visualize lineage, and identify which objects need to move together.

SQL-to-SQL translation is supported for T-SQL, Snowflake, Redshift, Oracle, BigQuery, and Teradata

Migrating from a legacy data warehouse is a complex undertaking, requiring teams to analyze decades-old code, translate proprietary dialects, migrate massive datasets, and reconcile differences between systems. Databricks is making it dramatically easier to migrate workloads from legacy data warehouses to the Lakehouse with Genie Code, Databricks' AI coding agent.

We are excited to announce the new agentic converter in Genie Code. The agentic code converter translates proprietary dialects to open ANSI SQL, starting with T-SQL, Snowflake, Redshift, Oracle, BigQuery, and Teradata. It transforms a data warehouse migration from a project your team staffs and manages to one you configure, launch, and monitor.

Automated migration planning

To see how the agentic converter works in practice, we'll walk through a proof of concept converting a set of T-SQL stored procedures to ANSI SQL.

To start the migration, we create a migration project, a new feature in a Databricks workspace. Migration projects give teams a central hub to manage source files, track conversion progress, and collaborate throughout the migration. We name our project Migration Project - POC, set the source dialect to T-SQL, the target to ANSI SQL, and choose a destination folder for the converted files. Once created, we can populate the project with source SQL files, which were previously uploaded to the workspace. Each file appears in the project with its file type, lines of code, and migration status:

Genie Code analyzes and scores each file's complexity, surfacing an assessment in the right panel. In our example, mixed_5cats_sp_string_agg.sql scores low complexity because it contains only SQL features that map cleanly to ANSI SQL. For a full scale migration, teams can use the complexity score to prioritize and tackle simpler files first.

Genie Code also generates lineage, mapping every relationship between objects in the legacy estate — tables, views, and stored procedures. The lineage graph shows that sps_sp_update_from.sql and sps_sp_pivot.sql have no shared dependencies, meaning they can be safely migrated independently.

In a full-scale migration, complexity and lineage give teams a clear picture of what to migrate, in what order, and what needs to move together.

Fully agentic code conversion

After analyzing the source code, we can start to convert code. When we click Run, Genie Code analyzes each script's T-SQL and launches swarms of subagents to convert files in parallel. Each subagent iteratively fixes errors, validating both syntax and semantic intent to ensure the converted code retains the original business logic and successfully parses.

Once complete, the converted files are written to the destination folder and color-coded by status. In our proof of concept, 6 of 8 files were successfully converted. However, mixed_5cats_sp_string_agg.sql and mixed_6cats_sp_string_agg.sql need further review. Viewing the right panel, we can see the list of to-do’s required to fix the script. Genie Code explains that the flagged stored procedures must be qualified by a three part name in Unity Catalog (catalog.schema.sp_string_agg).

By clicking on the file, we can open the native SQL editor to explore the side-by-side difference. We can make the fix manually in the editor or codify a conversion rule by creating a custom skill in Genie Code. When we're ready to run the full migration, Genie Code will apply the rule, in this case giving stored procedures a three part name in Unity Catalog, automatically across the entire codebase. Custom skills are also useful for broader customization, like conforming to an approved ETL pattern or following internal naming conventions.

For teams looking to lift-and-shift, Databricks ships the full suite of enterprise SQL features. Multi-Statement Transactions, Temp Tables, and Stored Procedures — features commonly used in legacy data warehouses – are all available in Databricks, so there's no need to re-engineer your logic to fit a new platform.

Get started with the Agentic Converter today

The agentic code converter is the next generation of data warehouse migration tooling, building on Lakebridge’s success at scale. Since its launch at Data and AI Summit 2025, Lakebridge’s conversion tooling has helped over a thousand customers adopt the Databricks lakehouse:

“Lakebridge made our migration to Databricks more predictable and efficient. It handled the conversion of our legacy stored procedures into Spark Declarative Pipelines, which cut down a lot of the manual work and helped us move faster toward a consolidated open Lakehouse.”—Shane Irons, Sr. Director of Information Management

As a next step, we are expanding the agentic converter to support common legacy ETL sources and new target dialects. We also plan to bring data migration and reconciliation into the migration project experience, with a native Lakeflow Connect integration to migrate data and automated tools to validate that migrated data matches the source before cutover.

Ready to migrate? Connect with your Databricks account team to assess your legacy estate and try the agentic code converter here.

Get the latest posts in your inbox

Subscribe to our blog and get the latest posts delivered to your inbox.

Sign up

View all blogs