function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
du-scodouglasdu-scodouglas 

Upsert Process Limitations?

Hi,

 

I am running into some duplicate external ID errors when I am using the upsert process of the DataLoader. I am hoping that I am just overlooking something, and the functionality exists within the Loader.

 

I am migrating data from one salesforce instance to another, using external IDs to build relationships within the new instance. I use an external ID in the Account and one in the Contact objects.

 

The problem arises when I run into an Account with more than one contact, I start running into errors like this:

 

Duplicate external id specified: 001a000000o7h1hiar

 

Is this an actual limitation to the upsert process, or am I missing something? All the rows that returned this duplicate error have been pushed out into the error.csv, can I do anything with these? Thanks again, any help is appreciated. I would hate to have to migrate some rows manually!

Best Answer chosen by Admin (Salesforce Developers) 
sebcossebcos

Hi,

just to confirm the behavior of data loader and external IDs: the data loader tries to match records it's trying to upsert on the external id that you have specified. If it does not find a match , it inserts, if it does find one single match it updates. If it finds more matches it throws an error: this could happen if you have records with the same ids coming from an external system (can avoid this using the unique attribute for external ids) and in this case it makes sense that the data loader throws errors since it would not know what records you want to update . 

I would check that you are not trying to upsert records with the same external IDs and/or that you are not mapping the wrong column in your csv to find the external ids. That happens to me all the time. One suggestion, try a small number of records to see where the issue is.