Description Usage Arguments Value References Examples
View source: R/rforcecom.createBulkBatch.R
This function takes a data frame and submits it in batches to a an already existing Bulk API Job by chunking into temp files
1 | rforcecom.createBulkBatch(session, jobId, data, multiBatch=TRUE, batchSize=10000)
|
session |
a named character vector defining parameters of the api connection as returned by rforcecom.login |
jobId |
a character string defining the salesforce id assigned to a submitted job as returned by rforcecom.createBulkJob |
data |
a matrix or data.frame that can be coerced into .csv file for submitting as batch request |
multiBatch |
a boolean value defining whether or not submit data in batches to the api |
batchSize |
an integer value defining the number of records to submit if multiBatch is true. The max value is 10000 in accordance with salesforce limits. |
A list
of list
s, one for each batch submitted, containing 10 parameters of the batch
https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
# inserting 2 records
my_data <- data.frame(Name=c('New Record 1', 'New Record 2'),
My_External_Id__c=c('11111','22222'),
stringsAsFactors=FALSE)
batches_info <- rforcecom.createBulkBatch(session,
jobId=job_info$id,
data=my_data,
multiBatch=TRUE,
batchSize=50)
#upserting 3 records
my_data <- data.frame(My_External_Id__c=c('11111','22222', '99999'),
Name=c('Updated_Name1', 'Updated_Name2', 'Upserted_Record'),
stringsAsFactors=FALSE)
batches_info <- rforcecom.createBulkBatch(session,
jobId=job_info$id,
data=my_data,
multiBatch=TRUE,
batchSize=50)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.