Forum Discussion
Upsert data to Lakehouse Table using copy data
- 1 year ago
Hi Alaahady ,
You need to transfer table from on-premises sql server to datalake using incremental update (upsert) . I have provided all the possible work arounds. But you are expecting Low code / No code. You can try the "Copy job" in Data Factory, makes it easy to move data from your source to your destination without creating a pipeline.
Please refer below links.
How to create a Copy job in Data Factory - Microsoft Fabric | Microsoft Learn
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
Hi Alaahady ,
Thank you for reaching out to the Microsoft Community Forum.
You are trying to perform an incremental upsert from an on-premises SQL Server to a Lakehouse Table using the Copy activity, but encountered the error as “Upsert is not a supported table action for Lakehouse Table.”
Please try below things to fix the issue.
1. Dataflow Gen2 does not support Lakehouse Tables directly for upsert via Copy activity. you can Load data into a staging table (Fabric SQL) and use Dataflow Gen2 to manage incremental logic and then merge into Lakehouse using a notebook or pipeline.
2. Use Notebooks for Custom Upsert Logic, Load data into Lakehouse using Copy activity, Use a Spark notebook to compare and merge data (upsert logic).
Note: This allows schema evolution and conditional updates.
3. Compare schemas in a Spark notebook. Write changes to a staging configuration (CSV or SQL table). Use Fabric Pipeline to read changes and execute ALTER TABLE or MERGE statements in the Warehouse.
4. Use Power BI Premium with Hybrid Tables and then Configure Incremental Refresh with Real-Time Data and then check DirectQuery is enabled for recent partitions.
Please refer community thread.
Solved: Incremental refresh og selected refresh using data... - Microsoft Fabric Community
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
- v-dineshya1 year agoCommunity Support
Hi Alaahady ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh
- Alaahady1 year agoHelper II
Hi Dinesh,
Thank you for your recommendation, Your suggestion is amazing, but I was looking for Low code / No code solution
Alaa
- v-dineshya1 year agoCommunity Support
Hi Alaahady ,
You need to transfer table from on-premises sql server to datalake using incremental update (upsert) . I have provided all the possible work arounds. But you are expecting Low code / No code. You can try the "Copy job" in Data Factory, makes it easy to move data from your source to your destination without creating a pipeline.
Please refer below links.
How to create a Copy job in Data Factory - Microsoft Fabric | Microsoft Learn
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh