Skip to contents

This function closes a Job in the Salesforce Bulk API

Usage

sf_close_job_bulk(
  job_id,
  api_type = c("Bulk 1.0", "Bulk 2.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".

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 list of parameters defining the now closed job

Note

This is a legacy function used only with Bulk 1.0.

Examples

if (FALSE) { # \dontrun{
my_query <- "SELECT Id, Name FROM Account LIMIT 10"
job_info <- sf_create_job_bulk(operation='query', object='Account')
query_info <- sf_submit_query_bulk(job_id=job_info$id, soql=my_query)
recordset <- sf_query_result_bulk(job_id = query_info$jobId,
                                  batch_id = query_info$id,
                                  result_id = result$result)
sf_close_job_bulk(job_info$id)
} # }