cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Redshift Stored Procedure Migration to Databricks

Avinash_Narala
Valued Contributor II

Hi,

I want to migrate Redshift SQL Stored Procedures to databricks.

As databricks doesn't support the concept of SQL Stored Procedures. 

How can I do so?

5 REPLIES 5

MariuszK
Contributor

You can create a Python function or move logic a notebook, it depend what is the purpose of the procedure.

Avinash_Narala
Valued Contributor II

i have a bunch of procedures to convert. so it is not possible to generalise the purpose of each procedure. 

I need a wrapper program to convert redshift sql procedures into python functions in databricks notebooks

Rjdudley
Valued Contributor II

I am assuming you want a sproc so you have some code which is reusable across many notebooks.  If so, Databricks supports several types of functions: https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/sql-ref-functions

However if your Redshift sprocs are all of the processing logic, you should convert those to notebooks instead.

I don't know of any program which will directly convert Redshift SQL to Python (or Databricks SQL).  An LLM might help, perhaps even the Databricks Assistant in the cloud IDE.

MariuszK
Contributor

You can try with ChatGPT, ask the chat to convert it, you will be really suppressed. There is more advance option for that, but it's more complex.

Rjdudley
Valued Contributor II

Hey @Avinash_Narala in case you didn't see this announcement, looks like it might solver your problem: Welcoming BladeBridge to Databricks: Accelerating Data Warehouse Migrations to Lakehouse | Databrick...

I had no idea BladeBridge existed, so I'm pleased to see it's part of the Databricks offerings soon.  Some problems solve themselves.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group