databricks Databricks Blog ·

Databricks Simplifies SQL Migration to Lakehouse with Enhanced Procedural SQL

blogdatadatabricksgaengineer
feature announcement

Databricks has enhanced its SQL scripting capabilities to natively support complex procedural SQL constructs, including cursors, temporary tables, and multi-statement transactions. This significantly simplifies the lift-and-shift migration of legacy data warehouse stored procedures to the Databricks Lakehouse, reducing the need for costly rewrites in other languages. SQL teams and architects involved in modernizing data warehouses can now preserve original business logic and control flow using their existing SQL skills. Migrated procedures are integrated with Unity Catalog for governance and benefit from row-level conflict detection in atomic transactions, potentially slashing migration timelines by 50-75%.

Notes (1)
  • Streamlining Legacy SQL Stored Procedure Migration to Databricks Lakehouse

    Databricks SQL scripting now natively supports complex procedural SQL constructs, including cursors (since Runtime 18.1), session-scoped temporary tables, and multi-statement transactions using `BEGIN ATOMIC ... END`. This allows for a mechanical, line-by-line translation of legacy data warehouse stored procedures (e.g., from Oracle) to the Databricks Lakehouse, preserving original business logic and control flow without requiring rewrites in Python or Spark. Migrated procedures automatically gain Unity Catalog governance, including lineage and access control, and atomic transactions offer row

Read the original announcement →

https://www.databricks.com/blog/busting-sql-migration-myths-how-new-sql-features-make-lift-and-shift-lakehouse-easier

Related releases