Class: Bulk

Bulk

new Bulk(conn)

Class for Bulk API
Parameters:
Name Type Description
conn Connection Connection object
Source:

Classes

Batch
Job

Members

pollInterval :Number

Polling interval in milliseconds
Type:
  • Number
Source:

pollTimeout :Number

Polling timeout in milliseconds
Type:
  • Number
Source:

Methods

createJob(type, operation, options) → {Bulk~Job}

Create a new job instance
Parameters:
Name Type Argument Description
type String SObject type
operation String Bulk load operation ('insert', 'update', 'upsert', 'delete', or 'hardDelete')
options Object <optional>
Options for bulk loading operation
Source:
Returns:
Type
Bulk~Job

job(jobId) → {Bulk~Job}

Get a job instance specified by given job ID
Parameters:
Name Type Description
jobId String Job ID
Source:
Returns:
Type
Bulk~Job

load(type, operation, options, input, callback) → {Bulk~Batch}

Create and start bulkload job and batch
Parameters:
Name Type Argument Description
type String SObject type
operation String Bulk load operation ('insert', 'update', 'upsert', 'delete', or 'hardDelete')
options Object <optional>
Options for bulk loading operation
Properties
Name Type Argument Description
extIdField String <optional>
External ID field name (used when upsert operation).
input Array.<Record> | stream.Stream | String <optional>
Input source for bulkload. Accepts array of records, CSv string, and CSV data input stream.
callback Callback.<Array.<RecordResult>> <optional>
Callback function
Source:
Returns:
Type
Bulk~Batch