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:
- Source:
pollTimeout :Number
Polling timeout in milliseconds
Type:
- Source:
Methods
createJob(type, operation, optionsopt) → {Bulk~Job}
Create a new job instance
Parameters:
Name |
Type |
Attributes |
Description |
type |
String
|
|
SObject type |
operation |
String
|
|
Bulk load operation ('insert', 'update', 'upsert', 'delete', 'hardDelete', or 'query') |
options |
Object
|
<optional>
|
Options for bulk loading operation |
- Source:
Returns:
-
Type
-
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, optionsopt, inputopt, callbackopt) → {Bulk~Batch}
Create and start bulkload job and batch
Parameters:
Name |
Type |
Attributes |
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 |
Attributes |
Description |
extIdField |
String
|
<optional>
|
External ID field name (used when upsert operation). |
concurrencyMode |
String
|
<optional>
|
'Serial' or 'Parallel'. Defaults to Parallel. |
|
input |
Array.<Record>
|
stream.Stream
|
String
|
<optional>
|
Input source for bulkload. Accepts array of records, CSV string, and CSV data input stream in insert/update/upsert/delete/hardDelete operation, SOQL string in query operation. |
callback |
Callback.<(Array.<RecordResult>|Array.<Bulk~BatchResultInfo>)>
|
<optional>
|
Callback function |
- Source:
Returns:
-
Type
-
Bulk~Batch
Execute bulk query and get record stream
Parameters:
Name |
Type |
Description |
soql |
String
|
SOQL to execute in bulk job |
- Source:
Returns:
- Record stream, convertible to CSV data stream
-
Type
-
RecordStream.Parsable
Type Definitions
BatchInfo
Type:
Properties:
Name |
Type |
Description |
id |
String
|
Batch ID |
jobId |
String
|
Job ID |
state |
String
|
Batch state |
stateMessage |
String
|
Batch state message |
- Source:
BatchResultInfo
Type:
Properties:
Name |
Type |
Description |
id |
String
|
Batch result ID |
batchId |
String
|
Batch ID which includes this batch result. |
jobId |
String
|
Job ID which includes this batch result. |
- Source:
JobInfo
Type:
Properties:
Name |
Type |
Description |
id |
String
|
Job ID |
object |
String
|
Object type name |
operation |
String
|
Operation type of the job |
state |
String
|
Job status |
- Source: