(protected) new Job(bulk, typeopt, operationopt, optionsopt, jobIdopt)
Class for Bulk API Job
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bulk |
Bulk | Bulk API object | |||||||||||||
type |
String |
<optional> |
SObject type | ||||||||||||
operation |
String |
<optional> |
Bulk load operation ('insert', 'update', 'upsert', 'delete', or 'hardDelete') | ||||||||||||
options |
Object |
<optional> |
Options for bulk loading operation
Properties
|
||||||||||||
jobId |
String |
<optional> |
Job ID (if already available) |
- Source:
Extends
- events.EventEmitter
Methods
abort(callbackopt) → {Promise.<Bulk~JobInfo>}
Set the status to abort
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
Callback.<Bulk~JobInfo> |
<optional> |
Callback function |
- Source:
Returns:
- Type
- Promise.<Bulk~JobInfo>
batch(batchId) → {Bulk~Batch}
Get a batch instance specified by given batch ID
Parameters:
Name | Type | Description |
---|---|---|
batchId |
String | Batch ID |
- Source:
Returns:
- Type
- Bulk~Batch
check(callbackopt) → {Promise.<Bulk~JobInfo>}
Check the latest job status from server
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
Callback.<Bulk~JobInfo> |
<optional> |
Callback function |
- Source:
Returns:
- Type
- Promise.<Bulk~JobInfo>
close(callbackopt) → {Promise.<Bulk~JobInfo>}
Close opened job
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
Callback.<Bulk~JobInfo> |
<optional> |
Callback function |
- Source:
Returns:
- Type
- Promise.<Bulk~JobInfo>
createBatch() → {Bulk~Batch}
Create a new batch instance in the job
- Source:
Returns:
- Type
- Bulk~Batch
info(callbackopt) → {Promise.<Bulk~JobInfo>}
Wait till the job is assigned to server
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
Callback.<Bulk~JobInfo> |
<optional> |
Callback function |
- Source:
Returns:
- Type
- Promise.<Bulk~JobInfo>
list(callbackopt) → {Promise.<Array.<Bulk~BatchInfo>>}
List all registered batch info in job
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
Callback.<Array.<Bulk~BatchInfo>> |
<optional> |
Callback function |
- Source:
Returns:
- Type
- Promise.<Array.<Bulk~BatchInfo>>
open(callbackopt) → {Promise.<Bulk~JobInfo>}
Open new job and get jobinfo
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
Callback.<Bulk~JobInfo> |
<optional> |
Callback function |
- Source:
Returns:
- Type
- Promise.<Bulk~JobInfo>
open(callbackopt) → {Promise.<Bulk~JobInfo>}
Return latest jobInfo from cache
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
Callback.<Bulk~JobInfo> |
<optional> |
Callback function |
- Source:
Returns:
- Type
- Promise.<Bulk~JobInfo>