Bulk data upsert Salesforce DX command

If you need large volumes of data to be imported to the Org, the CLI also provides bulk API commands, which allow you to upsert data from the CSV file into the Org.

The following is a sample command to upsert data using the CSV file:

$ sfdx force:data:bulk:upsert -s Account -f./path/to/file.csv -i ExternalId__c -w 2

The preceding command will upsert Account data from the file with the name file.csv, which is in the /path/to/ path, using the ExternalId field ExternalId__c, and will wait for two minutes before refreshing the command-line display.

You can also track the status of the job and the batch using a job or a combination of job and batch IDs. The following command shows the sample command set for ...

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.