You need to sign in to do that
Don't have an account?

Data Loader Command Line Extract - Is there a way to feed Object name and SOQL as parameters?
Several properties like username, password etc. need to be repeated for every bean in process-conf.xml.
class="com.salesforce.dataloader.process.ProcessRunner"
singleton="false">
<description>Exports all the accounts.</description>
<property name="name" value="accountExport"/>
<property name="configOverrideMap">
<map>
<entry key="sfdc.debugMessages" value="true"/>
<entry key="sfdc.endpoint" value="https://login.salesforce.com"/>
<entry key="sfdc.username" value="myusername@sfdc.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 the encrypt.bat utility -->
<entry key="sfdc.password" value="db8254a11bbd32cef5cd2f"/>
<entry key="process.encryptionKeyFile" value="C:\SalesforceDataLoader\key.txt"/>
<entry key="sfdc.timeoutSecs" value="600"/>
<entry key="sfdc.loadBatchSize" value="200"/>
<entry key="sfdc.entity" value="Account"/>
<entry key="process.operation" value="extract"/>
<entry key="dataAccess.name" value="C:\SalesforceDataLoader\accountInsert.csv"/>
<entry key="process.outputSuccess" value="C:\SalesforceDataLoader\accountInsert_success.csv"/>
<entry key="process.outputError" value="C:\SalesforceDataLoader\accountInsert_error.csv"/>
<entry key="dataAccess.type" value="csvWrite" />
<entry key="dataAccess.writeBatchSize" value="1" />
<entry key="sfdc.extractionRequestSize" value="1" />
<entry key="process.enableExtractSuccessOutput" value="true" />
<entry key="process.initialLastRunDate" value="2005-12-01T00:00:00.000-0800"/>
<entry key="dataAccess.name" value="C:\SalesforceDataLoader\Exported_Accounts.csv" />
<entry key="sfdc.extractionSOQL" value="select id, Name, Industry, Phone from account" />
</map>
</property>
</bean>
- Is there a way to minimize this noise? In other words, is there a way to not repeat this?
- Is it possible to pass Object name and SOQL query dynamically from the batch file?
- When exported file doesn't exist, is it possible to force the bean to create it automatically?
class="com.salesforce.dataloader.process.ProcessRunner"
singleton="false">
<description>Exports all the accounts.</description>
<property name="name" value="accountExport"/>
<property name="configOverrideMap">
<map>
<entry key="sfdc.debugMessages" value="true"/>
<entry key="sfdc.endpoint" value="https://login.salesforce.com"/>
<entry key="sfdc.username" value="myusername@sfdc.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 the encrypt.bat utility -->
<entry key="sfdc.password" value="db8254a11bbd32cef5cd2f"/>
<entry key="process.encryptionKeyFile" value="C:\SalesforceDataLoader\key.txt"/>
<entry key="sfdc.timeoutSecs" value="600"/>
<entry key="sfdc.loadBatchSize" value="200"/>
<entry key="sfdc.entity" value="Account"/>
<entry key="process.operation" value="extract"/>
<entry key="dataAccess.name" value="C:\SalesforceDataLoader\accountInsert.csv"/>
<entry key="process.outputSuccess" value="C:\SalesforceDataLoader\accountInsert_success.csv"/>
<entry key="process.outputError" value="C:\SalesforceDataLoader\accountInsert_error.csv"/>
<entry key="dataAccess.type" value="csvWrite" />
<entry key="dataAccess.writeBatchSize" value="1" />
<entry key="sfdc.extractionRequestSize" value="1" />
<entry key="process.enableExtractSuccessOutput" value="true" />
<entry key="process.initialLastRunDate" value="2005-12-01T00:00:00.000-0800"/>
<entry key="dataAccess.name" value="C:\SalesforceDataLoader\Exported_Accounts.csv" />
<entry key="sfdc.extractionSOQL" value="select id, Name, Industry, Phone from account" />
</map>
</property>
</bean>
Sorry for this issue you are encountering.
May I suggest you please check with below link from the stack exchange community with a similar discussion which might help you further with the above issue.
- https://salesforce.stackexchange.com/questions/181188/data-loader-command-line-extract-issue
Hope this helps.Kindly mark this as solved if the reply was helpful.
Thanks,
Nagendra