sf_batch_details_bulk: Returning the Details of a Batch in a Bulk API Job

View source: R/bulk-operation.R

sf_batch_details_bulkR Documentation

Returning the Details of a Batch in a Bulk API Job

Description

This function returns detailed (row-by-row) information on an existing batch which has already been submitted to Bulk API Job

Usage

sf_batch_details_bulk(
  job_id,
  batch_id,
  api_type = c("Bulk 1.0"),
  verbose = FALSE
)

Arguments

job_id

character; the Salesforce Id assigned to a submitted job as returned by sf_create_job_bulk. It will start with "750".

batch_id

character; the Salesforce Id assigned to a submitted batch as returned by sf_create_batches_bulk. It will start with "751".

api_type

character; one of "REST", "SOAP", "Bulk 1.0", or "Bulk 2.0" indicating which API to use when making the request.

verbose

logical; an indicator of whether to print additional detail for each API call, which is useful for debugging. More specifically, when set to TRUE the URL, header, and body will be printed for each request, along with additional diagnostic information where available.

Value

A tbl_df, formatted by Salesforce, with information containing the success or failure or certain rows in a submitted batch, unless the operation was query, then it is a data.frame containing the result_id for retrieving the recordset.

Note

This is a legacy function used only with Bulk 1.0.

References

https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch

Examples

## Not run: 
job_info <- sf_create_job_bulk(operation = "query", object = "Account")
soql <- "SELECT Id, Name FROM Account LIMIT 10"
batch_query_info <- sf_submit_query_bulk(job_id = job_info$id, soql = soql)
batch_details <- sf_batch_details_bulk(job_id=batch_query_info$jobId,
                                       batch_id=batch_query_info$id)
sf_close_job_bulk(job_info$id)

## End(Not run)

salesforcer documentation built on March 18, 2022, 6:26 p.m.