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
Ritu Ghosh 13Ritu Ghosh 13 

Error:null:InvalidBatch : InvalidBatch : Failed to parse CSV. Not expecting more text after end quote.... while tring to insert 500 accounts via workbench

While trying to insert about 500 Accounts via Bulk API  getting Error as "null:InvalidBatch : InvalidBatch : Failed to parse CSV. Not expecting more text after end quote" .

Inserting Data using "PUT" request via WorkBench.
Steps followed as mentioned below:
1. Get  the job ID via /jobs/ingest in the URI
2. Put over 500 records of Account (insert) with contentType as "text/csv"  and appending Jobid in URI
/jobs/ingest/<jobId>/batches
3. Patch  the state as "UploadComplete" with  contentType as "application/json"
4. Get  the data with  respective Job Id in URI 

Post  above steps I  am getting Error as "null:InvalidBatch : InvalidBatch : Failed to parse CSV. Not expecting more text after end quote

It will be very helpful if someone can guide me further . I have checked Input  data isn't having any space at the end .

Example input :
"Name"
"Insuron Bulk Company"
"Orboid Bulk Company"
"Bovis Bulk Company"
"Roughies Bulk Company"
"Otherside Bulk Company"
"Endipin Bulk Company"
"Austech Bulk Company"
"Quility Bulk Company"
"Bleendot Bulk Company"
"Apex Bulk Company"
"Cognicode Bulk Company"
"Securia Bulk Company"
"Fanfare Bulk Company"
"Obones Bulk Company"
"Eyeris Bulk Company"
"Techtrix Bulk Company"
"Ceprene Bulk Company"
"Vortexaco Bulk Company"
"Techmania Bulk Company"
"Gleamink Bulk Company"
"Apextri Bulk Company"
"Orbalix Bulk Company"
"Zentry Bulk Company"
"Inear Bulk Company"
"Genesynk Bulk Company"
"Flum Bulk Company"

I  have 500  records as mentioned above.

Thanks,
Ritu Ghosh
SandhyaSandhya (Salesforce Developers) 
Hi,

Place your cursor just after the last quote character of the last line in your file, then plress the right arrow key. If you cursor jumps down to the next line, you have an extra new line character in there. Simply press your backspace key to remove it, then save the file.

Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
 
Best Regards
Sandhya
 
Ritu Ghosh 13Ritu Ghosh 13
Thanks Sandhya , but I have alreay tried out this option and it isn't working still . Also to  highlight I  am trying this upsert request via WorkBench.
Layla HamidLayla Hamid
Remove the quotes from your data and try again. It works for me!
Karunya ReddyKarunya Reddy
Check if any one of the records missing quotes.