sf_submit_query_bulk: Submit Bulk Query Batch to a Bulk API Job

View source: R/bulk-query.R

sf_submit_query_bulkR Documentation

Submit Bulk Query Batch to a Bulk API Job

Description

This function takes a SOQL text string and submits the query to an already existing Bulk API Job of operation "query"

Usage

sf_submit_query_bulk(job_id, soql, 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".

soql

character; a string defining a SOQL query (e.g. "SELECT Id, Name FROM Account").

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 parameters of the batch

Note

Bulk API query doesn't support the following SOQL:

  • COUNT

  • ROLLUP

  • SUM

  • GROUP BY CUBE

  • OFFSET

  • Nested SOQL queries

  • Relationship fields

Additionally, Bulk API can't access or query compound address or compound geolocation fields.

References

Bulk 1.0 documentation

Examples

## Not run: 
my_query <- "SELECT Id, Name FROM Account LIMIT 1000"
job_info <- sf_create_job_bulk(operation = 'query', object = 'Account')
query_info <- sf_submit_query_bulk(job_id = job_info$id, soql = my_query)

## End(Not run)

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