[SalesForce] Understanding the implementation of “Use Bulk API” Trailhead

With regards to this trailhead: Use Bulk API

I have completed the example provided in the explanation part, but when I came to the actual challenge, I was stumbled.

In the example, it says:

For this example, we’re adding a set of records with only four accounts. Usually, you use Bulk API to add thousands or millions of records, but the principle is the same. Copy the following CSV text into the request body.

"Name"
"Sample Bulk API Account 1"
"Sample Bulk API Account 2"
"Sample Bulk API Account 3"
"Sample Bulk API Account 4"

Actual challenge has a CSV file with 500 records which are needed to be inserted to complete it. This seems pretty easy initially. But does it mean that I need to copy all the records from CSV and paste them in the request body within quotation marks(for each record)? If this is the case, I can do it. No problem. But what if we have a million records that are needed to be inserted? Do I need to format them with quotes around them?

Best Answer

The quotation marks are a part of CSV format - they delimit columns if commas or other special characters are included in the field values. They shouldn't actually be required with the sample data shown there, but they don't do any harm either.

While you should not have to "munge" the supplied sample data in that way for the Trailhead challenge, if you ever need to, you can use an application like LibreOffice to force quotation of all CSV field values.

Related Topic