Play Games

Search This Blog

Wednesday, September 27, 2017

Data Loader Command-Line Interface In Salesforce

Thank you Shiva Chitta for sharing this information.

INTRODUCTION:
Data Loader is tool provided by Salesforce for bulk import or export of data. Sometimes, we come across many scenarios where we want to automate the operations or we perform the same task repeatedly.
In this case, we can use Salesforce Data Loader Command Line Interface (CLI).
CLI runs Data Loader from the command line but it is challenging and difficult to set up. So there CLI quickstart (CLIq) comes into help. It will generate all required files for Command line data loader.
  Installation Steps:
·                 Install Data Loader version 17.0 or later.
·                To download Data Loader, login to Salesforce and go to
       Set Up -> Data Management -> Data Loader -> Download Data Loader
·                Download the latest version of CLIq
·                Unzip cliq.zip and copy & paste the ‘cliq’ folder into your Data Loader home directory
      Typically, this is: C:\Program Files\salesforce.com\Data Loader\cliq
 Configuration Steps:

Go to C:\Program Files\salesforce.com\Data Loader\cliq and open cliq.properties file for proxy settings.

Note: By default, cliq will set for Production. To use it for the sandbox, uncomment line 23 (remove # and save it).
Let’s Get Started – (Part 1 – Data Export)
To run CLIq, run cliq.bat on Windows (cliq.sh on UNIX).
1. Choose an Operation
2. Enter the process name (string). Example: Export_ Accounts
3. Click on Next and enter your org credentials (username, password + security token)
4. Enter Query (Export) or Entity (Object API Name).
5. Review results and create Data Loader CLI Files.
Note: When trying to run process.bat for Salesforce Data Loader from the command line, I encountered an error, "The system cannot find the path specified".
Follow the below steps to resolve the error:

1) Create a folder dataloader (no spaces) in C:\ drive (C:\dataloader)
2) Copy dataloader.jar ,JAVA folder and cliq folder from C:\Program Files\salesforce.com\Data Loader to C:\dataloader
3) Run cliq.bat from cliq folder

A directory will be created with name same as Process name.
·         C:\dataloader\cliq_process\Export_Accounts

As we selected Export Operation, it will automatically create a Export_Accounts.csv file with all data in C:\dataloader\cliq_process\Export_Accounts\write.






No comments:

Post a Comment