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
FabricTrailLear
New Member

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
rosha_rosha
Resolver II
Resolver II

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

rosha_rosha
Resolver II
Resolver II

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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