Data Loader Command-Line Operations and Exit Codes

When running Data Loader in batch mode from the command line, several operations are supported. An operation represents the flow of data between Salesforce and an external data source, such as a CSV file or database. You can use these operations and refer to these exit codes.

Required Editions
Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer editions

Operations 

The Data Loader command-line interface is supported for Windows only.

Note

Enter values in the process.operation parameter in lowercase.

Note

OperationDescription
extractUses the Salesforce Object Query Language to export a set of records from Salesforce. The exported data is written to a data source. Soft-deleted records are not included.
extract_allUses SOQL to export a set of records from Salesforce, including existing and soft-deleted records. The exported data is written to a data source.
insertLoads data from a data source into Salesforce as new records.
updateLoads data from a data source into Salesforce, and updates existing records with matching ID fields.
upsertLoads data from a data source into Salesforce. Existing records with a matching custom external ID field are updated. Records without matches are inserted as new records.
deleteLoads data from a data source into Salesforce, and deletes existing records with matching ID fields. Deleted records are moved to the Recycle Bin.
hard_deleteLoads data from a data source into Salesforce, and deletes existing records with matching ID fields without first storing them in the Recycle Bin.

Exit Codes 

To help you find the cause of an error, Data Loader version 62 and later uses these exit codes.

Exit CodeDescription
0Successful execution. If the property process.batchMode.exitWithErrorOnFailedRows is set to false (default is false) in the Data Loader config.properties file, then the execution can succeed, even if one or more rows fails to upload.
1Client-side error occurred.
2Server-side error occurred.
3Error in executing the operation.
4Operation succeeded but failed to upload one or more rows due to an error in data. This exit code is only used if the property process.batchMode.exitWithErrorOnFailedRows is set to true (default is false) in the Data Loader config.properties file.