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
BrianWXBrianWX 

Dataloader Unable to Read CSV

I am using Dataloader Windows version 53.0.3.  I use it to schedule to load data into Salesforce on a regular basis.
https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/loader_batchmode_intro.htm
 
When I tried to load a csv file with 205K rows, it failed with error:
com.sforce.async.CSVReader$CSVParseException: Not expecting more text after end quote
 
The csv file was generated from SSIS (SQL Server Integration Services) that pulled data from a MSSQL.
 
The number of fields in my file was 6 columns.  The datatype was: number, text, text, number, text, number.
 
I have made sure the text columns were in double quotes to ensure proper char escape.  I used Notepad++ to check for weird hidden chars. I checked the last row for abnormality but could not anything unusual. 
 
Did anyone run into similar issue with data exporting from SSIS, and how did you resolve this?
 
Thanks,
Brian
 
PS: The Dataloader UI gave the error!
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Brain,

Can you find the the below validations .

Then it can be fixed following below points

> In CSV file, one column has comma. I normally replace comma by semicolon (If accepted by client) or you can enclose it in double quotes
> In CSV file, one column has double quotes. I normally replace double quotes by single quotes.
> CSV file contains non ASCII characters. It can be removed by searching using expression [^\x00-\x7F]+.

please find reference (https://www.jitendrazaa.com/blog/salesforce/considerations-and-best-practices-for-salesforce-dataloading/) article for the same.

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
Shri RajShri Raj
This error is often caused by incorrect formatting of the CSV file, such as missing or extra quotes or commas. It may also be due to the presence of special characters that are not supported by the CSV format.
To resolve this issue, try the following steps:
Check if there are any extra quotes or commas in the text fields, and remove them.
Ensure that each record is on a separate line and there are no blank lines within the file.
Verify that the text fields are enclosed in double quotes and any quotes within the text are properly escaped.
Save the file in UTF-8 or ASCII encoding, as these encodings are supported by Data Loader.
Try loading a smaller subset of the data to isolate if the issue is with the data or the Data Loader process.
Consider using a different tool or script to format the data before loading it into Salesforce, such as using the Apex Data Loader, the Salesforce CLI, or a custom script using the Salesforce API.
BrianWXBrianWX
Thanks, Shri.
Double quotes within escaped double quotes were the issue.
Example: "Webb, "Telescope" James"