Newer Version Available

This content describes an older version of this product. View Latest

Step Four: Create the Configuration File

Available in: Salesforce Classic (not available in all orgs) and Lightning Experience
Available in: Enterprise, Performance, Unlimited, Developer, and Database.com Editions

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

Note

The process-conf.xml file contains the information that Data Loader needs to process the data. Each <bean> in the process-conf.xml file refers to a single process such as an insert, upsert, or export. Therefore, this file can contain multiple processes. In this step, you edit the file to insert accounts into Salesforce.
  1. Make a copy of the process-conf.xml file from the \samples\conf directory. Be sure to maintain a copy of the original because it contains examples of other types of Data Loader processing such as upserts and exports.
  2. Open the file in a text editor, and replace the contents with the following XML:
    1<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
    2<beans>
    3    <bean id="accountInsert"
    4        class="com.salesforce.dataloader.process.ProcessRunner"
    5        scope="prototype">
    6        <description>accountInsert job gets the account record from the CSV file 
    7            and inserts it into Salesforce.</description>
    8        <property name="name" value="accountInsert"/>
    9        <property name="configOverrideMap">
    10            <map>
    11                <entry key="sfdc.debugMessages" value="true"/>
    12                <entry key="sfdc.debugMessagesFile" 
    13                    value="C:\DLTest\Log\accountInsertSoapTrace.log"/>
    14                <entry key="sfdc.endpoint" value="https://servername.salesforce.com"/>
    15                <entry key="sfdc.username" value="admin@Org.org"/>
    16                <!--Password below has been encrypted using key file, 
    17                    therefore, it will not work without the key setting: 
    18                    process.encryptionKeyFile.
    19                    The password is not a valid encrypted value, 
    20                    please generate the real value using the encrypt.bat utility -->
    21                <entry key="sfdc.password" value="e8a68b73992a7a54"/>
    22                <entry key="process.encryptionKeyFile" 
    23                    value="c:\Users\{user}\.dataloader\dataLoader.key"/>
    24                <entry key="sfdc.timeoutSecs" value="600"/>
    25                <entry key="sfdc.loadBatchSize" value="200"/>
    26                <entry key="sfdc.entity" value="Account"/>
    27                <entry key="process.operation" value="insert"/>
    28                <entry key="process.mappingFile" 
    29                    value="C:\DLTest\Command Line\Config\accountInsertMap.sdl"/>
    30                <entry key="dataAccess.name" 
    31                    value="C:\DLTest\In\insertAccounts.csv"/>
    32                <entry key="process.outputSuccess" 
    33                    value="c:\DLTest\Log\accountInsert_success.csv"/>
    34                <entry key="process.outputError" 
    35                    value="c:\DLTest\Log\accountInsert_error.csv"/>
    36                <entry key="dataAccess.type" value="csvRead"/>
    37                <entry key="process.initialLastRunDate" 
    38                    value="2005-12-01T00:00:00.000-0800"/>
    39            </map>
    40        </property>
    41    </bean>
    42</beans>
  3. Modify the following parameters in the process-conf.xml file. For more information about the process configuration parameters, see Data Loader Process Configuration Parameters.
    • sfdc.endpoint—Enter the URL of the Salesforce instance for your organization; for example, https://yourInstance.salesforce.com/.
    • sfdc.username—Enter the username Data Loader uses to log in.
    • sfdc.password—Enter the encrypted password value that you created in step 2.
    • process.mappingFile—Enter the path and file name of the mapping file.
    • dataAccess.Name—Enter the path and file name of the data file that contains the accounts that you want to import.
    • sfdc.debugMessages—Currently set to true for troubleshooting. Set to false after your import is up and running.
    • sfdc.debugMessagesFile—Enter the path and file name of the command line log file.
    • process.outputSuccess—Enter the path and file name of the success log file.
    • process.outputError—Enter the path and file name of the error log file.

    Use caution when using different XML editors to edit the process-conf.xml file. Some editors add XML tags to the beginning and end of the file, which causes the import to fail.

    Warning