cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Stored Procedure creation in Unity Catalog

harman
New Contributor II

Does Databricks support the direct creation of stored procedures using the CREATE PROCEDURE syntax?

7 REPLIES 7

-werners-
Esteemed Contributor III

AFAIK databricks does not have stored procedures, but sql queries can be stored and executed, which is kinda the same.

SergeRielau
Databricks Employee
Databricks Employee

No stored procedures at this point. Have you looked at Notebooks?
If so and you still think you need/want stored procedures I would very much like to learn about it:

  • Is this a migration (from where)
  • Which features of procedures do you need? 

-werners-
Esteemed Contributor III

affirmative, notebooks are imo a (better) replacement for SPs

harman
New Contributor II

We have a requirement to retrieve records dynamically based on parameters from multiple tables via an external application using an API.

SergeRielau
Databricks Employee
Databricks Employee

Are you saying you need to "glue together" the query dynamically.
Thsi requires logic and it all has to fit into a JDBC call?
I.e. you need a CALL statement which hides the complexity?

harman
New Contributor II

Yes, I need to dynamically prepare the query using parameters, execute it on the Unity catalog, and display the results in the application's UI screen. That's why I want to write the logic in a stored procedure and call it.

-werners-
Esteemed Contributor III

there is a sql api, which can run sql queries but also a job rest api which launches a job. this job can run one or more notebooks.

https://docs.databricks.com/en/sql/admin/sql-execution-tutorial.html

https://docs.databricks.com/api/workspace/jobs

 

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