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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

November Update

Fabric Monthly Update - November 2024

Check out the November 2024 Fabric update to learn about new features.

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! Early Bird pricing ends December 9th.