Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
Hi,
I have a small dataset that I am using in my project and trying to perform upserts in a lakehouse table using python in fabric notebooks, but couldn't figure out a way to do that. I can overwrite or append the table using this
Solved! Go to Solution.
I am using the below code and it is working,
I am using the below code and it is working,
Hi @fabric_1 ,
We really appreciate your efforts and for letting us know the update on the issue.
Please continue using fabric community forum for your further assistance.
Thank you for reaching out to us on the Microsoft Fabric Community Forum.
Hi @fabric_1 ,
Thank you for reaching out to us on the Microsoft Fabric Community Forum.
You are correct — the write_deltalake() function, which utilizes the delta-rs engine (engine='rust'), does not currently support native MERGE INTO or upsert operations as PySpark does. It only allows basic write modes such as 'append', 'overwrite', and 'error'.
However, it is possible to simulate upsert behavior as a workaround using pure Python. This typically involves manually merging the new data with the existing data and handling deduplication before writing it back to the table. Please note that this approach lacks transactional guarantees. As you mentioned that you used small dataset once try this.
If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.
Hi @fabric_1 ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @fabric_1 ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @fabric_1 ,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
9 | |
4 | |
3 | |
3 | |
2 |