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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
sarunachalam
Regular Visitor

upsert option missing in copy activity of microsoft fabric data pipeline

Hi 

 

I don't see an option to upsert (insert new rows and update existing rows based on PK) in copy activity or in data flow gen2. Is there an alternative how I can acheive this? I am using Azure SQL Warehouse in Fabric as target.

 

Regards

Subbu

1 ACCEPTED SOLUTION
sarunachalam
Regular Visitor

Hi Thanks for the response.

 

I used a work around, I load the data to a stage table and then created a procedure to left join the stage table & actual table to compare & insert missing records and update the existing records with 2 seperate SQL statements (first for update and then for insert). 

View solution in original post

4 REPLIES 4
sarunachalam
Regular Visitor

Hi Thanks for the response.

 

I used a work around, I load the data to a stage table and then created a procedure to left join the stage table & actual table to compare & insert missing records and update the existing records with 2 seperate SQL statements (first for update and then for insert). 

Anonymous
Not applicable

Hi @sarunachalam 

 

Can you tell me if your problem is solved? If yes, please accept it as solution.

 

Regards,

Nono Chen

sarunachalam
Regular Visitor

Thanks for your quick response. I am looking for upsert option in data pipelines or data flow gen2. I understand MERGE command is not available in Azure SQL Warehouse as of now. But in one of the thread in the link https://community.fabric.microsoft.com/t5/Data-Pipelines/Fabric-Data-Factory-Pipeline-Incremental-lo... I understand this is now enabled in a private view This is the part of the comment I read. Hence wanted to check if there is a way to get the upsert (Its in private preview, please ping me with your workspace id, and we can enable it for you along with instructions.)

NandanHegde
Super User
Super User

Based on my knowlegde, Upsert/Merge is not yet directly supported for fabric warehouse.

So you would have to copy the data into a staging table and then leverage the below logic to upsert into destination table

https://community.fabric.microsoft.com/t5/Data-Pipelines/Datawarehouse-MERGE-command-not-working-in-...

 




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.

Top Solution Authors