Thursday 7 February 2013

How to use Salesforce Dataloader Command Line Interface Quickstart (CLIq) ?


Requirements
===========
Data Loader 17.0 or later (Login to Salesforce, and go to Setup|Data Management|Data Loader)
Windows XP or Later (See CLIqOnUnix for Unix installation)
Installation Instructions
=================
  • Install Data Loader version 17.0 or later.
  • Download the latest version of CLIq:
  • Unzip cliq.zip into your Data Loader home directory. Typically this is:

    • C:\Program Files\salesforce.com\Apex Data Loader 17.0 -or- C:\Program Files\salesforce.com\Data Loader
      • You should have a directory:
                      C:\Program Files\salesforce.com\Apex Data Loader 17.0\cliq     

Configuration
============
To configure proxy support, enter your proxy settings in cliq.properties:

#
# CLIq.properties
#

### All of these properties are Optional ###

#Set your Salesforce username and password
sfdc.username=
sfdc.password=

# i.e. proxy.company.com
sfdc.proxyHost=
# i.e. 8080
sfdc.proxyPort=
sfdc.proxyNtlmDomain=
sfdc.proxyUsername=
sfdc.proxyPassword=

# Use https://test.salesforce.com/services/Soap/u/ for Sandbox instances
# NOTE: Make sure the version is equal or lower than your version of Data Loader.
#
# For example:

To use CLIq with Sandbox, uncomment the sfdc.endpoint line.

Starting CLIq
===========

To run CLIq, run cliq.bat on Windows or cliq.sh on UNIX.

Using Graphical UI
================

1. Choose an Operation
  The process name is a string which is used to identify your process. Example: Export_Accounts
2. Login
3. Enter Query or Entity
4. Review Results and Create Files


Using the Files
===============

  • A directory name will be created using the process name you entered. For example, if your process name is import accounts, CLIq will create a directory called import_accounts
    • Cliq 1.2: The process directory will be under dataloaderhome/cliq
    • Cliq > 1.2: The process directory will be under dataloaderhome/cliq_process
  • For DML Opertations (Insert, Update, Upsert, Delete), you will need to complete the configuration manually. See instructions for Configuring DML.
  • To run the script
    • On Windows, open the processname directory and run processname.bat.
  • Instructions for Configuring DML:
    • Replace processname/read/processname.csv with your source CSV file.
      • e.g,
                    "ID","LASTNAME","EMAIL","COMPANY"
                    "00Q7000000TNtBCEA1","Miller","nouser@acme.com","Acme"
                    "00Q7000000TNtBDEA1","Smith","noone@widgetmaker.com","Widgets R US"
      • Do not change the file name. Just replace the existing .CSV file with your file.
      • Note the headers for each column
    • Open processname/config/processname.sdl. Create a mapping with the CSV column header on the left and the Salesforce Field on the right.
               e.g,
               # Created by Dataloader Cliq
               #
               # Create your field mapping list in the following format
               ID
=Id
               LASTNAME
=LastName
               EMAIL
=Email
               COMPANY
=Company

    • The Salesforce Field is case-sensitive
    • Insert should not have an "Id" mapping
    • Update requires an "Id" mapping
    • Delete only needs an "Id" mapping

Some more about CLIq:

What CLIq Does


  • Quickly configure scheduled exports/updates for your Salesforce Org
  • Text and graphical interface
  • Handles all the tricky stuff:
    • Creates a process-conf.xml
    • Validates your username/password, queries, and entity names (avoids case-sensitivity issues)
    • Encrypts password
    • Creates an organized directory structure
    • Creates a bat file which can be scheduled on Windows using Windows Scheduler
    • Creates a sh script which can be scheduled on UNIX using cron
  • Written in Java - Tested on Windows and Mac OS X (UNIX)!

What CLIq Doesn't Do (Yet)


  • Write SOQL statements (for Exports) - You'll need to know how to write SOQL.
  • Configure Data Loader to write directly to Databases
  • Automatically configure SDL file.


  • Helpful Links:

No comments:

Post a Comment

Thank you for visiting. Your comments are highly appreciated.