Redshift Stored Procedure Migration to Databricks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2025 11:59 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2025 12:59 AM
You can create a Python function or move logic a notebook, it depend what is the purpose of the procedure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2025 04:21 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2025 06:12 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2025 04:30 AM - edited 01-30-2025 04:33 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2025 09:02 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2025 11:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2025 04:22 PM
Talk to your Databricks account rep about whether there is a preview still open on Stored Procedures.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2025 10:18 PM
Hi Avinash, You could give ChatGPT a shot — just ask it to help convert it for you. You might honestly be surprised by how well it handles it. There are more advanced ways to do it too, though those can get a bit tricky if you're not used to them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2025 06:05 AM
Databricks docs shows procedures are in public preview and requires runtime 17.0 and above.
https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-create-procedure