function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
t1cadmin@scotiacapital.com.devt1cadmin@scotiacapital.com.dev 

Variables in the Data Loader process beans?

Hello, everyone,

 

Wonder if anybody knows how to use variables in the XML beans of the Data loader CLI processes?

 

For example, I would like to replace the path "c:\dataloader\samples\" with a text variable in the body of the bean and be able to change the value of this variable when necessary.

 

It seems like the standard XSLT variable syntax does not work within a bean... :(

 

Thanks a lot for your help!

 


<bean id="opportunityUpsertProcess"
          class="com.salesforce.dataloader.process.ProcessRunner"
          singleton="false">
        <description>Opportunity Upsert job gets the Customer record updates from a CSV file and uploads them to salesforce using 'upsert'.</description>
        <property name="name" value="opportunityUpsertProcess"/>
        <property name="configOverrideMap">
            <map>
                <entry key="sfdc.endpoint" value="https://www.salesforce.com"/>
                <entry key="sfdc.username" value="user@mycompany.com"/>
                <!-- password below has been encrypted using key file, therefore it will not work without the key setting: process.encryptionKeyFile
                the password is not a valid encrypted value, please generate the real value using encrypt.bat utility -->
                <entry key="sfdc.password" value="5555555555555555"/>
                <entry key="process.encryptionKeyFile" value="c:\dataloader\samples\conf\sample.key"/>
                <entry key="sfdc.timeoutSecs" value="600"/>
                <entry key="sfdc.loadBatchSize" value="200"/>
                <entry key="sfdc.externalIdField" value="Oracle_Id__c"/>
                <entry key="sfdc.entity" value="Opportunity"/>
                <entry key="process.operation" value="upsert"/>
                <entry key="process.mappingFile" value="c:\dataloader\samples\conf\opportunityUpsertMap.sdl"/>
                <entry key="dataAccess.name" value="c:\dataloader\samples\data\opportunityData.csv"/>
                <entry key="dataAccess.type" value="csvRead"/>
                <entry key="process.initialLastRunDate" value="2006-12-01T00:00:00.000-0800"/>
            </map>
        </property>
    </bean>

Brent BowersBrent Bowers
Same question.
Dev_AryaDev_Arya
I wonder why no one replied to this in last 7 years. But in case if anyone still needs this, you can define the variables at the begining of your config file like this:
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<!ENTITY datadirectory "c:\dataloader\samles">
.
.
//&variablename; //there is a semicolon after the variable name
<entry key="process.mappingFile" value="&datadirectory;\accountInsertMap.sdl"/>
.

One can use the variable name for almost all the parameter names here, username, password, etc.

Hope this helps.

Cheers,Dev 
JP Nikko AM SystemsJP Nikko AM Systems
Hi,
I came across your post as I'm having same issue. Doesn't work for when path includes spaces though. Any special characters I need to include?