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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply

When will the MERGE SQL query be supported in Microsoft Fabric Warehouse?

Hello,

I am currently working with Microsoft Fabric Warehouse and attempting to use the MERGE SQL statement to perform upserts (insert/update operations). However, it seems that the MERGE statement is currently not supported in Fabric's warehouse SQL engine.

Could someone from the Microsoft team or the community provide clarification on:

  • Whether MERGE support is planned for Microsoft Fabric Warehouse?
  • If so, is there an estimated timeline for when this feature might be rolled out?
  • Are there any recommended workarounds in the meantime for achieving similar functionality?

This feature is quite essential for many data integration and ETL/ELT scenarios, and I’m sure many users would benefit from knowing the roadmap or alternatives.

Thanks in advance for your help!

2 ACCEPTED SOLUTIONS

MERGE support is planned as part of ongoing SQL capabilities improvements in Fabric Warehouse, but:

  • No official ETA has been provided publicly by Microsoft.
  • Based on trends, it is expected sometime in 2025, possibly in H2 2025, as part of broader T-SQL language parity updates.

You can follow updates on:

You can follow updates on:

 

 

Workarounds for MERGE in Fabric Warehouse

Until MERGE is available, you can replicate its behavior with manual UPSERT logic using a combination of UPDATE and INSERT with NOT EXISTS.

 

-- 1. UPDATE existing records

UPDATE target

SET target.column1 = source.column1,

    target.column2 = source.column2

FROM target_table AS target

JOIN staging_table AS source

    ON target.primary_key = source.primary_key;

 

-- 2. INSERT new records

INSERT INTO target_table (primary_key, column1, column2)

SELECT source.primary_key, source.column1, source.column2

FROM staging_table AS source

LEFT JOIN target_table AS target

    ON target.primary_key = source.primary_key

WHERE target.primary_key IS NULL;

 

Tip: If your tables are large, consider indexing your join keys and/or breaking up operations into batches for performance.

 

Alternative: ELT with Dataflows Gen2 + Notebooks

If you're orchestrating pipelines in Fabric:

  • Use Dataflows Gen2 for staging and deduplication
  • Combine with Lakehouse Notebooks (PySpark) for flexible logic
  • Write the final curated data into your Warehouse

View solution in original post

v-bmanikante
Community Support
Community Support

Hi @FabricTrailLear ,

 

We would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.

 

If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,

B Manikanteswara Reddy

View solution in original post

2 REPLIES 2
v-bmanikante
Community Support
Community Support

Hi @FabricTrailLear ,

 

We would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.

 

If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,

B Manikanteswara Reddy

MERGE support is planned as part of ongoing SQL capabilities improvements in Fabric Warehouse, but:

  • No official ETA has been provided publicly by Microsoft.
  • Based on trends, it is expected sometime in 2025, possibly in H2 2025, as part of broader T-SQL language parity updates.

You can follow updates on:

You can follow updates on:

 

 

Workarounds for MERGE in Fabric Warehouse

Until MERGE is available, you can replicate its behavior with manual UPSERT logic using a combination of UPDATE and INSERT with NOT EXISTS.

 

-- 1. UPDATE existing records

UPDATE target

SET target.column1 = source.column1,

    target.column2 = source.column2

FROM target_table AS target

JOIN staging_table AS source

    ON target.primary_key = source.primary_key;

 

-- 2. INSERT new records

INSERT INTO target_table (primary_key, column1, column2)

SELECT source.primary_key, source.column1, source.column2

FROM staging_table AS source

LEFT JOIN target_table AS target

    ON target.primary_key = source.primary_key

WHERE target.primary_key IS NULL;

 

Tip: If your tables are large, consider indexing your join keys and/or breaking up operations into batches for performance.

 

Alternative: ELT with Dataflows Gen2 + Notebooks

If you're orchestrating pipelines in Fabric:

  • Use Dataflows Gen2 for staging and deduplication
  • Combine with Lakehouse Notebooks (PySpark) for flexible logic
  • Write the final curated data into your Warehouse

Helpful resources

Announcements
MarchFBCvideo - carousel

Fabric Monthly Update - March 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors
Top Kudoed Authors
Users online (7,013)
  • nirali_arora
  • saigonsneakerco
  • lixi88bcom
  • ramonsuarez
  • AMeyersen
  • theross
  • dufoq3
  • prathy
  • discolisa
  • BakkenMSU
  • mdaatifraza5556
  • thegioiiiccom1
  • miquelmartorell
  • ww88green1
  • cvr
  • Shampa
  • rajendraongole1
  • anmolmalviya05
  • Alaminsheik
  • deepakkumar456
  • ics_sys_usr
close