Forum Discussion
RE: udf
Can you please confirm whether udfs are all session scoped and persistent udfs are not possible to create (in lakehouse) as one can in databricks catalog?
6 Replies
- v-prasareCommunity Support
Hi smpa01,
-
UDFs in the Lakehouse (via Notebooks or SQL Analytics Endpoints) are session-scoped only. Persistent UDFs are not supported in Lakehouse currently.
-
Each time you start a new session, you'd need to re-define your UDFs manually if you need them again.
Please refer to below blog and let u know if this helps?
Thanks,
Prashanth Are
-
- smpa01Community Champion
What is the practical use case of udf in fabric then?
- AndreyBearAdvocate II
Can you clarify your question? I'm suspecting a terminology confusion here.
Fabric UDFs execute their code in a per-session scope, which is a good thing. Having only a single persistant instance of a UDF would be a fun way to leak session states from one call to the other. They are essentially rest-lke. You can make a UDF that acts something onto a backend/callback (aka POST) - e.g. writes data, or triggers a pipeline, etc.
- v-prasareCommunity Support
I’d encourage you to submit your detailed feedback and ideas via Microsoft's official feedback channels, such as the Microsoft Fabric Ideas.
Feedback submitted here is often reviewed by the product teams and can lead to meaningful improvement. you query about UDFs is valid, please submit feedback and upvote this idea.
- v-prasareCommunity Support
Hi smpa01,
We are following up once again regarding your query. Could you please confirm if you raised idea with Microsoft?
we kindly request you to share the resolution or key insights here to help others in the community. If we don’t hear back, we’ll go ahead and close this thread.
Should you need further assistance in the future, we encourage you to reach out via the Microsoft Fabric Community Forum and create a new thread. We’ll be happy to help.
Thank you for your understanding and participation.