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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
coverturfLSH
Resolver I
Resolver I

Warehouse error: An item with the same key has already been added

Hi,

 

I'm receiving the following error when trying to make changes to my default dataset model. 

 

"Underlying Error{"batchRootActivityId":"26100d88-6567-4cba-8d34-b8f06ef60bdd","exceptionDataMessage":"An item with the same key has already been added."}"

 

This error first showed up after the following chain of events

  1. We started making relationships between existing tables in the model
  2. We realized we needed to change one of the column types in a model that already had an existing relationship (child table).
  3. Before deleteing the relationship (this is where I think things got messed up). We tried to drop the table and recreate it with the correct column type. 
  4. The drop and create failed because of the existing relationship.
  5. We then went back into the model to delete the relationship and now this error occurs shows up whenever we try to do anything with the default dataset model. I think there's a ghost-duplicate of the table that got created in step 3.  
  6. My thought processes was to use T-SQL to delete the relationship and after the issue: (Transaction failed because this DDL statement is not allowed inside a snapshot isolation transaction. Since metadata is not versioned, a metadata change can lead to inconsistency if mixed within snapshot isolation.) was resolved by adding SET TRANSACTION ISOLATION LEVEL READ COMMITTED before the ALTER TABLE ... DROP CONTRAINT. It deleted the relationship and then I was able to drop the table.
     
  7. So I then thought, I'm good and now in the clear. The table has been dropped. However, I'm still getting the error. 

Has anyone else encountered this error before and been able to resolve it?

Thanks,

Cameron

2 REPLIES 2
coverturfLSH
Resolver I
Resolver I

Submitted a support ticket as well. Case number: 2401040010002883

Anonymous
Not applicable

Hi @coverturfLSH ,

Thanks for sharing the support ticket number. Lets wait for the support team look into your issue.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Kudoed Authors