View source: R/bulk-operation.R
sf_create_batches_bulk | R Documentation |
This function takes a data frame and submits it in batches to a an already existing Bulk API Job by chunking into temp files
sf_create_batches_bulk( job_id, input_data, batch_size = NULL, api_type = c("Bulk 1.0", "Bulk 2.0"), verbose = FALSE )
job_id |
|
input_data |
|
batch_size |
|
api_type |
|
verbose |
|
a tbl_df
containing details of each batch
https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch
## Not run: # NOTE THAT YOU MUST FIRST CREATE AN EXTERNAL ID FIELD CALLED My_External_Id # BEFORE RUNNING THIS EXAMPLE # inserting 2 records my_data <- tibble(Name=c('New Record 1', 'New Record 2'), My_External_Id__c=c('11111','22222')) job_info <- sf_create_job_bulk(operation='insert', object='Account') batches_ind <- sf_create_batches_bulk(job_id = job_info$id, input_data = my_data) # upserting 3 records my_data2 <- tibble(My_External_Id__c=c('11111','22222', '99999'), Name=c('Updated_Name1', 'Updated_Name2', 'Upserted_Record')) job_info <- sf_create_job_bulk(operation='upsert', externalIdFieldName='My_External_Id__c', object='Account') batches_ind <- sf_create_batches_bulk(job_id = job_info$id, input_data = my_data2) sf_get_job_bulk(job_info$id) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.