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

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Reply
coverturfLSH
Resolver II
Resolver II

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

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
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.

May FBC25 Carousel

Fabric Monthly Update - May 2025

Check out the May 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.