How to Import Data using Command Line of Salesforce Data Loader?

0 votes
John d'souza asked 08-Feb-2018 in SalesForce by John d'souza

How to Import Data using Command Line of Salesforce Data Loader?

1 Answer

0 votes
Tarun Gautam answered 09-Feb-2018 by Tarun Gautam
Salesforce provides the facility to import data from command line. This facility is available in both the versions Salesforce Classic and Lightning Experience, and the editions are Developer, Enterprise, Unlimited, Performance, and

Note, that, the Data Loader command-line interface is supported only for Windows.

For importing the data there are some needs for User Permissions:

To insert recordsAdd on the record
To update recordsEdit on the record
To upsert recordsCreate or Edit on the record
To delete records Delete on the record
To hard delete recordsDelete on the record
Now, you can execute the command in Data Loader from the command-line and insert some new accounts. To do it copy the following data into a file name accountInsert.csv. This is the account record that you are importing into your organization.
Name, Industry, NumberOfEmployees
Dickenson plc, Consulting, 120
GenePoint, Biotechnology, 265
Express Logistics and Transport, Transportation, 12300
Grand Hotels & Resorts Ltd, Hospitality, 5600

Use the following command into your command prompt:
process.bat "<file path to process-conf.xml>" <process name>
  • Replace <file path to process-conf.xml> with the path to the directory containing process-conf.xml.
  • Replace <process name> with the process specified in process-conf.xml.

Your command should look something like this:
process.bat "C:\DLTest\Command Line\Config" accountInsert
After execution, the command prompt window will display success and error messages, but you can also check the log files: insertAccounts_success.csv and insertAccounts_error.csv, and after the successful execution, the insertAccounts_success.csv file contains your imported records, with the ID and status of each record.