2

I have a Data Loader CLI script importing data (Lead records) automatically from csv based on some schedule. Last week I stumbled upon following issue:

DataLoader (both CLI and GUI version) doesn't support special Unicode characters(symbols)!

Issue occurred when one of the Leads had LastName equal to 💗. Since LastName is required on Lead the batch failed.

It's quite easy to reproduce:

  1. Create Lead with FirstName = John, LastName = 💗 in SF
  2. Download it with DataLoader (remember about write as UTF-8 setting)
  3. Try inserting the same CSV file with DataLoader
  4. You should then get: Data loader err

For this:

"ID","LASTNAME","FIRSTNAME"
"00Q1l000001ONm7EAG","A💗","💗"

I got success in DataLoader:

Data Loader result print scr

but invalid record in SF: SF print scr

Now interesting thing:

  1. Other unicode like Japanese characters are working fine
  2. I can of course create such Lead manually without DataLoader
  3. I have Read + Write all CSVs with UTF-8 set and looks like (when exporting or trying to import that in CSVs the encoding is fine).

Any ideas? Did anyone else have such an issue?

  • This is silly, but do you have the last version? Also, have you tried the Data Import Wizard? – Sebastian Kessel Nov 27 '18 at 23:01
  • Thanks @SebastianKessel, no silly questions here :) But yes, I'm using latest version (44). I didn't try Data Import Wizard. It's not a one-time import, but a scheduled script so I will need to stick to Data Loader CLI – neff Nov 27 '18 at 23:14
  • 2
    @neff Still researching this issue, but I would suggest looking at Salesforce DX. It has a data import feature, uses the command-line, and supports UTF-8 correctly without being so finicky. – sfdcfox Nov 28 '18 at 1:38
  • Thanks @sfdcfox Good point with Salesforce DX, haven't thought about it. You mean data:bulk:upsert, right? I have everything set up in Data Loader CLI but maybe I need to switch in future. – neff Nov 28 '18 at 8:38
  • @neff Yeah, the force:data:bulk:upsert function is the one I was thinking of. It does practically everything the data loader can do without all the extra configuration options. Granted, there's arguably still a use for either, but I'd take sfdx over ADL any day of the week, if possible. – sfdcfox Nov 28 '18 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.