Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowFabric Data Days Monthly is back. Join us on March 26th for two expert-led sessions on 1) Getting Started with Fabric IQ and 2) Mapping & Spacial Analytics in Fabric. Register now
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:
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!
Solved! Go to Solution.
MERGE support is planned as part of ongoing SQL capabilities improvements in Fabric Warehouse, but:
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:
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
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:
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:
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Fabric update to learn about new features.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |