3

I'm using Data Loader in order to Upsert some data within my Org.

I know, that if I will Upsert a record within my CSV that has duplicate External Id value with another record in the file, It will throw me a duplicate error and the record will not be upload.

But i'm not sure - Dose Data loader will not upload the duplicated records at all?

Or it will upload the first record seeing on the CSV file, and then when he hits the other one it will throw a duplicate exception?

1 Answer 1

5

I will put 2 scenarios over here. I have created following csv file to upload data into my org, where

External Site Id is External Id (unique is not selected)

External Site key is External Id and also unique

Dataload_ExternalId

Scenario 1:

By default, Batch size of dataloader is "200"

So, if we perform upsert based on External Site Id or External Site Key, then in both the cases, Salesforce will try to process both the records in single batch and it will throw the error "Duplicate External Ids"

Scenario 2:

Change batch size to "1"

Perform upsert based on External Site Id or External Site Key, then in both the cases, Salesforce will try to process both the records in two different batches and successfully uploads the data.

2 things to be noted here:

  1. You will NOT receive any errors during upload. both of the records will be processed.

  2. Most importantly, Salesforce will update data with latest record that has been updated. So, in SFDC we will find single record (here the last record) with External Site Id

5
  • Hi Santanu Boral, Thank you for the respond! Jso to make sure, I need to use a 1 batch size to avoid this?
    – Alon Segal
    Commented Jan 10, 2017 at 18:42
  • Actually if you make batch size to 1 then it will take longer time if you try to process large volume of data. But at-least you will not receive duplicate error Commented Jan 10, 2017 at 18:44
  • or otherwise, when you are preparing the csv you can eliminate duplicate there and then upload the data in SFDC Commented Jan 10, 2017 at 18:45
  • So in conclusion, to create a 1 batch size it isnt a solution (I have 160,000 records file). I MUST have a unique records in order to use upsert and avoid duplicates. Thanks again
    – Alon Segal
    Commented Jan 10, 2017 at 18:46
  • please close this ques Commented Jan 10, 2017 at 18:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .