Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Shubham_rai955
Super User
Super User

Writeback using UDF to Lakehouse table

I am building a writeback solution in Microsoft Fabric using a Lakehouse table but facing the issue.
The goal is to let users (for example, from Power BI) update specific records in a Lakehouse dataset — like changing GoalAmount for a given Manufacturer, Territory, and GoalMonth — directly through a Fabric UDF.

Is this possible? If Yes please help.

1 ACCEPTED SOLUTION
v-hjannapu
Community Support
Community Support

Hello @Shubham_rai955 ,
Thank you  for reaching out to the Microsoft fabric community forum.

 

Directly updating a Lakehouse table using a Fabric UDF is not supported right now. Lakehouse is mainly for analytics, not for transactional updates.

If you need writeback from Power BI, here are the best options:
Use a Fabric SQL Database this is Microsoft’s recommended way because it supports UDFs and transactions properly or use a staging approach ,Send changes to a staging table and then run a notebook or pipeline to update your main Lakehouse table.

Direct writeback into Lakehouse through UDF is not reliable today. Using SQL DB or staging will give you a stable solution.

Kindly refer to the below documentation links for better understanding:
Choose between Lakehouse and Warehouse in Fabric 

Hope the above provided information help you resolve the issue, if you have any further concerns or queries, please feel free to reach out to us.

Regards,
Community Support Team.

 

View solution in original post

5 REPLIES 5
SaiTejaTalasila
Super User
Super User

Hi @Shubham_rai955 ,

 

A practical workaround is to route updates through a staging table (via Power BI or a custom app) and then trigger a notebook or pipeline to apply those changes to the target Lakehouse.

 

Alternatively, you can check out my custom visual + middleware approach, which I implemented to enable real-time writeback directly from Powe BI(premium or non-premium workspaces ).

https://www.linkedin.com/posts/talasila-sai-teja-098932174_powerbi-customvisuals-datavisualization-a...

 

Thanks,

Sai Teja 

v-hjannapu
Community Support
Community Support

Hello @Shubham_rai955 ,
Thank you  for reaching out to the Microsoft fabric community forum.

 

Directly updating a Lakehouse table using a Fabric UDF is not supported right now. Lakehouse is mainly for analytics, not for transactional updates.

If you need writeback from Power BI, here are the best options:
Use a Fabric SQL Database this is Microsoft’s recommended way because it supports UDFs and transactions properly or use a staging approach ,Send changes to a staging table and then run a notebook or pipeline to update your main Lakehouse table.

Direct writeback into Lakehouse through UDF is not reliable today. Using SQL DB or staging will give you a stable solution.

Kindly refer to the below documentation links for better understanding:
Choose between Lakehouse and Warehouse in Fabric 

Hope the above provided information help you resolve the issue, if you have any further concerns or queries, please feel free to reach out to us.

Regards,
Community Support Team.

 

Hi @Shubham_rai955,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We are always here to support you.


Regards,
Community Support team.


tackytechtom
Most Valuable Professional
Most Valuable Professional

Hi @Shubham_rai955 ,

 

I actually tried to connect to a Lakehouse with UDFs, but I was only able to connect to it either via the SQL Endpoint (read only) or onto the files. Here the class documentation:
fabric.functions.fabric_class.FabricLakehouseClient class | Microsoft Learn

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

tackytechtom
Most Valuable Professional
Most Valuable Professional

Hi @Shubham_rai955 ,

 

Have you tried looking into translytical task flows? I have tested them with a Fabric SQL Database and it really works like a charm. Essentially, you register a User Data Function (Fabric UDF; Note, there are also DAX UDFs (User Defined Functions, but in the context of translytical taskflows we refer to UDFs as User Data Functions) and then you can update records from the Power BI front end. 

 

I have not tested it myself with a Lakehouse table, but I could imagine it to work, too as you write Python Code in your User Data Function. However, my gut feeling says that a database would be handling such transactions in a better fashion (maybe that is why Microsoft recommends using a SQL DB).

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Helpful resources

Announcements
FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Fabric Update Carousel

Fabric Monthly Update - March 2026

Check out the March 2026 Fabric update to learn about new features.