How can we load string attribute values with double quotation?

Question

While using Data Loader by giving CSV file which contains data with double Quotation (") in beginning and ending, getting error for parsing the whole csv file. The CSV file is double pipe (||) separated. 

And the data is coming from source as like below:

 

IdentifierId||NAME||CompanyIndicator||PartyStatus

123||"ABC Consultants"||false||Active

345||"XYZ limited||true||InActive

789||KL Soliution"||false||Active

 

This generates the following error.

Error.JPG

 

Answer

  • In most cases having values with "" symbols would be the attribute for the : IOException: (line 77481) invalid char between encapsulated token and delimiter which would result in files failing to successfully parse.
  • Therefore if you have:
Example : "Hello World"

The following implementation will solve your problem

Example:   ""Hello World""

 

I suggest in making the update from using values with "" symbols  to "" "" and verify if you're then able ytpo parse files as expected without any generating any system platform errors.

Example:

Source Data                                               In CSV 
Stiching Ziekeuis "ABC Smilling"                "Stiching Ziekeuis ""ABC Smilling"""
"Somer Labs Somerset Labs"                     """Somer Labs Som Labs"""
PJC "LC" EuroPlot                                        "PJC ""LC"" EuroPlot"
"Treom" Line pvt. Ltd.                                    """Treom"" Line pvt. Ltd."

 

=================================================================

Since CSV is not a well-defined format, we give you some hints on how to upload .CSV files to RebaseData or how to parse .CSV files that come out of RebaseData. We follow the proposal of RFC 4180.

  • Encoding: UTF-8
  • Line separator: CRLF
  • Values in a line are separated by a comma
  • The first line represents the field names
  • Each field might be enclosed in double quotes
  • Double quotes inside of quoted fields must be escaped with another double quote

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.