bulk.nu
13 exported commands
0 internal commandssf bulk insert
Insert records into Salesforce using the Bulk API 2.0.
Accepts a table of records from the pipeline or a CSV file path. Returns a summary with the job ID and record counts.
Usage
sf bulk insert {flags} <object>
Flags
-h, --help- Display the help message for this command
--file <path>- Path to a CSV file to upload
--poll-interval <duration>- Time between status checks (default: 500ms)
--timeout <duration>- Max wait time (default: 1day)
Parameters
object <string>- SObject type (e.g. Account, Lead)
Input/output types
| # | input | output |
|---|---|---|
| 0 | any | any |
Examples
insert accounts from a table
[{Name: "Acme" Industry: "Tech"} {Name: "Globex" Industry: "Manufacturing"}] | sf bulk insert Accountinsert from a CSV file
sf bulk insert Account --file accounts.csvsf bulk update
Update existing records in Salesforce using the Bulk API 2.0.
The input data must include the Id field for each record.
Usage
sf bulk update {flags} <object>
Flags
-h, --help- Display the help message for this command
--file <path>- Path to a CSV file to upload
--poll-interval <duration> (default- 500ms)
--timeout <duration> (default- 1day)
Parameters
object <string>- SObject type (e.g. Account, Lead)
Input/output types
| # | input | output |
|---|---|---|
| 0 | any | any |
Examples
update accounts from a table
[{Id: "001XX0000003DHP" Name: "Updated Corp"}] | sf bulk update Accountupdate from a CSV file
sf bulk update Account --file updates.csvsf bulk upsert
Upsert records in Salesforce using the Bulk API 2.0.
If a record with the given external ID exists, it is updated; otherwise a new record is created.
Usage
sf bulk upsert {flags} <object>
Flags
-h, --help- Display the help message for this command
--external-id-field <string>- The external ID field name (default: 'Id')
--file <path>- Path to a CSV file to upload
--poll-interval <duration> (default- 500ms)
--timeout <duration> (default- 1day)
Parameters
object <string>- SObject type (e.g. Account, Lead)
Input/output types
| # | input | output |
|---|---|---|
| 0 | any | any |
Examples
upsert accounts by external ID
[{My_External_Id__c: "EXT-001" Name: "Acme"}] | sf bulk upsert Account --external-id-field My_External_Id__csf bulk delete
Delete records from Salesforce using the Bulk API 2.0.
The input data must contain only the Id field.
Usage
sf bulk delete {flags} <object>
Flags
-h, --help- Display the help message for this command
--file <path>- Path to a CSV file (must contain only Id column)
--poll-interval <duration> (default- 500ms)
--timeout <duration> (default- 1day)
Parameters
object <string>- SObject type (e.g. Account, Lead)
Input/output types
| # | input | output |
|---|---|---|
| 0 | any | any |
Examples
delete accounts by ID
[{Id: "001XX0000003DHP"} {Id: "001XX0000003DHQ"}] | sf bulk delete Accountdelete from a CSV file
sf bulk delete Account --file deletes.csvsf bulk hard-delete
Hard-delete records from Salesforce using the Bulk API 2.0.
Unlike soft-delete, hard-deleted records are not recoverable from the Salesforce recycle bin. The input data must contain only the Id field.
Usage
sf bulk hard-delete {flags} <object>
Flags
-h, --help- Display the help message for this command
--file <path>- Path to a CSV file (must contain only Id column)
--poll-interval <duration> (default- 500ms)
--timeout <duration> (default- 1day)
Parameters
object <string>- SObject type (e.g. Account, Lead)
Input/output types
| # | input | output |
|---|---|---|
| 0 | any | any |
Examples
hard-delete accounts by ID
[{Id: "001XX0000003DHP"}] | sf bulk hard-delete Accountsf bulk query
Run a bulk SOQL query using the Bulk API 2.0.
Creates a query job, waits for completion, and returns all results as a Nu table. Automatically paginates through large result sets.
Usage
sf bulk query {flags} <soql>
Flags
-h, --help- Display the help message for this command
--include-deleted- Include deleted/archived records (queryAll)
--poll-interval <duration> (default- 500ms)
--timeout <duration> (default- 1day)
--max-records <int>- Max records per result page (default: 50000)
Parameters
soql <string>- The SOQL query string
Input/output types
| # | input | output |
|---|---|---|
| 0 | any | any |
Examples
bulk query all accounts
sf bulk query "SELECT Id, Name FROM Account"bulk query with deleted records
sf bulk query "SELECT Id, Name FROM Account" --include-deletedsf bulk status
Get the status of a Bulk API 2.0 job.
Returns a record with job state, record counts, and other metadata.
Usage
sf bulk status {flags} <job_id>
Flags
-h, --help- Display the help message for this command
--query- Whether this is a query job (default: ingest job)
Parameters
job_id <string>- The job ID to check
Input/output types
| # | input | output |
|---|---|---|
| 0 | any | any |
Examples
check the status of an ingest job
sf bulk status 7501T00000Abc123check the status of a query job
sf bulk status 7501T00000Abc123 --querysf bulk results
Get the successful results from a completed Bulk API 2.0 ingest job.
Returns a table with sf__Id, sf__Created, and the original data fields.
Usage
sf bulk results <job_id>
Flags
-h, --help- Display the help message for this command
Parameters
job_id <string>- The job ID
Input/output types
| # | input | output |
|---|---|---|
| 0 | any | any |
Examples
get successful records from an ingest job
sf bulk results 7501T00000Abc123sf bulk failures
Get the failed results from a completed Bulk API 2.0 ingest job.
Returns a table with sf__Id, sf__Error, and the original data fields.
Usage
sf bulk failures <job_id>
Flags
-h, --help- Display the help message for this command
Parameters
job_id <string>- The job ID
Input/output types
| # | input | output |
|---|---|---|
| 0 | any | any |
Examples
get failed records from an ingest job
sf bulk failures 7501T00000Abc123sf bulk unprocessed
Get the unprocessed records from a Bulk API 2.0 ingest job.
Returns a table of records that were not processed (e.g. due to job abort).
Usage
sf bulk unprocessed <job_id>
Flags
-h, --help- Display the help message for this command
Parameters
job_id <string>- The job ID
Input/output types
| # | input | output |
|---|---|---|
| 0 | any | any |
Examples
get unprocessed records from an ingest job
sf bulk unprocessed 7501T00000Abc123sf bulk abort
Abort a running Bulk API 2.0 job.
Usage
sf bulk abort {flags} <job_id>
Flags
-h, --help- Display the help message for this command
--query- Whether this is a query job
Parameters
job_id <string>- The job ID to abort
Input/output types
| # | input | output |
|---|---|---|
| 0 | any | any |
Examples
abort an ingest job
sf bulk abort 7501T00000Abc123abort a query job
sf bulk abort 7501T00000Abc123 --querysf bulk delete-job
Delete a Bulk API 2.0 job.
Removes the job and its associated data from Salesforce. The job must be in a terminal state (JobComplete, Aborted, or Failed).
Usage
sf bulk delete-job {flags} <job_id>
Flags
-h, --help- Display the help message for this command
--query- Whether this is a query job
Parameters
job_id <string>- The job ID to delete
Input/output types
| # | input | output |
|---|---|---|
| 0 | any | any |
Examples
delete an ingest job
sf bulk delete-job 7501T00000Abc123delete a query job
sf bulk delete-job 7501T00000Abc123 --querysf bulk list-jobs
List all Bulk API 2.0 ingest jobs.
Usage
sf bulk list-jobs {flags}
Flags
-h, --help- Display the help message for this command
--query- List query jobs instead of ingest jobs
Input/output types
| # | input | output |
|---|---|---|
| 0 | any | any |
Examples
list all ingest jobs
sf bulk list-jobs