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
rlongrlong 

Walkthrough on Dataloader Line Command

I developed an XML member to do a simple extract of data from SalesForce using DataLoader. When I execute the process using a .bat file, the screen flashes and then nothing. No error messages or other messages. Is there a way to have a walkthrough on the code to see what it is actually doing? It isn't creating the extract, so something is incorrect. This is my first try at the command line processing, so I'm sure it is something simple I'm missing.
Any help would be appreciated.
Best Answer chosen by Admin (Salesforce Developers) 
MVJMVJ
You need to run the process from the Data Loader BIN Directory.

I have the a seperate directory for my process-conf XML "D:\SFDC\DataLoader\conf"

When I run the job I use the following Batch File that changes the directotry to the BIN folder for the data loader then calls the ectract process that is located in the CONF directory.


The BAT File I run has the following 2 lines:

CD "C:\Program Files\salesforce.com\Apex Data Loader 13.0\bin\"
Call process D:\SFDC\DataLoader\conf MDRAccountExtractProcess


=============================================================

Hope this helps.

Mike

All Answers

rlongrlong

I got it to kick off the bat file and echo the following, but it makes no sense to me other than listing the things in the XML member:

 


C:\Program Files\salesforce.com\Apex Data Loader 11.0\Batch Processing>call proc
ess "C:\Program Files\salesforce.com\Apex Data Loader 11.0\Batch Processing" ser
ialExportProcess

C:\Program Files\salesforce.com\Apex Data Loader 11.0\Batch Processing>if not ["
C:\Program Files\salesforce.com\Apex Data Loader 11.0\Batch Processing"] == [] g
oto run

C:\Program Files\salesforce.com\Apex Data Loader 11.0\Batch Processing>set PROCE
SS_OPTION=

C:\Program Files\salesforce.com\Apex Data Loader 11.0\Batch Processing>if not [s
erialExportProcess] == [] set PROCESS_OPTION=process.name=serialExportProcess

C:\Program Files\salesforce.com\Apex Data Loader 11.0\Batch Processing>..\_jvm\b
in\java.exe -cp ..\DataLoader.jar -Dsalesforce.config.dir="C:\Program Files\sale
sforce.com\Apex Data Loader 11.0\Batch Processing" com.salesforce.lexiloader.pro
cess.ProcessRunner process.name=serialExportProcess
0 [main] INFO com.salesforce.lexiloader.process.ProcessConfig  - Loading process
 configuration from config file: C:\Program Files\salesforce.com\Apex Data Loade
r 11.0\Batch Processing\process-conf.xml
63 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader  -
Loading XML bean definitions from file [C:\Program Files\salesforce.com\Apex Dat
a Loader 11.0\Batch Processing\process-conf.xml]
63 [main] DEBUG org.springframework.beans.factory.xml.XmlBeanDefinitionReader  -
 Using JAXP implementation [com.sun.org.apache.xerces.internal.jaxp.DocumentBuil
derFactoryImpl@1256ea2]
94 [main] DEBUG org.springframework.beans.factory.xml.ResourceEntityResolver  -
Trying to resolve XML entity with public ID [-//SPRING//DTD BEAN//EN] and system
 ID [http://www.springframework.org/dtd/spring-beans.dtd]
110 [main] DEBUG org.springframework.beans.factory.xml.ResourceEntityResolver  -
 Trying to locate [spring-beans.dtd] in Spring jar
110 [main] DEBUG org.springframework.beans.factory.xml.ResourceEntityResolver  -
 Found beans DTD [http://www.springframework.org/dtd/spring-beans.dtd] in classp
ath
141 [main] DEBUG org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionP
arser  - Loading bean definitions
141 [main] DEBUG org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionP
arser  - Default lazy init 'false'
141 [main] DEBUG org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionP
arser  - Default autowire 'no'
141 [main] DEBUG org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionP
arser  - Default dependency check 'none'
157 [main] INFO org.springframework.core.CollectionFactory  - JDK 1.4+ collectio
ns available
172 [main] INFO org.springframework.core.CollectionFactory  - Commons Collection
s 3.x available
172 [main] DEBUG org.springframework.core.CollectionFactory  - Creating [java.ut
il.LinkedHashMap]
188 [main] DEBUG org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionP
arser  - Found 1 <bean> elements in file [C:\Program Files\salesforce.com\Apex D
ata Loader 11.0\Batch Processing\process-conf.xml]
188 [main] DEBUG org.springframework.beans.factory.xml.XmlBeanFactory  - Creatin
g instance of bean 'serialExportProcess' with merged definition [Root bean: clas
s [com.salesforce.lexiloader.process.ProcessRunner]; abstract=false; singleton=f
alse; lazyInit=false; autowire=0; dependencyCheck=0; initMethodName=null; destro
yMethodName=null; factoryMethodName=null; factoryBeanName=null; defined in file
[C:\Program Files\salesforce.com\Apex Data Loader 11.0\Batch Processing\process-
conf.xml]]
188 [main] DEBUG org.springframework.beans.factory.xml.XmlBeanFactory  - Invokin
g BeanPostProcessors before instantiation of bean 'serialExportProcess'

The XML member was as follows, with the pasword and username x'd out
 
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
    <bean id="serialExportProcess"
          class="com.salesforce.lexiloader.process.ProcessRunner"
          singleton="false">
      <description>Serial Number Export job gets serial number info from salesforce and saves info into a CSV file."</description>
        <property name="name" value="SerialExportProcess"/>
        <property name="configOverrideMap">
            <map>
                <entry key="sfdc.debugMessages" value="true"/>
                <entry key="sfdc.debugMessagesFile" value="C:\Program Files\salesforce.com\Apex Data Loader 11.0\Batch Processing\serialSoapTrace.log"/>
                <entry key="sfdc.endpoint" value="https://www.salesforce.com"/>
                <entry key="sfdc.username" value="xxxxxxxxxxx"/>
                <entry key="sfdc.password" value="xxxxxxxxx"/>
                <entry key="sfdc.timeoutSecs" value="600"/>
                <entry key="sfdc.loadBatchSize" value="200"/>
                <entry key="sfdc.entity" value="Serial_Number__c"/>
                <entry key="sfdc.extractionRequestSize" value="500"/>
                <entry key="sfdc.extractionSOQL" value="Select Id, Serial_Number_Key__c, Item_Number__c, Name FROM Serial_Number__c"/>
                <entry key="process.operation" value="extract"/>
                <entry key="dataAccess.type" value="csvWrite"/>
                <entry key="dataAccess.writeUTF8" value="true"/>
                <entry key="dataAccess.name" value="z:\SFDC SERIAL TEXT\sernextr.csv"/>
            </map>
        </property>
    </bean>
</beans>
 
 
Any help would be appreciated.
MVJMVJ
You need to run the process from the Data Loader BIN Directory.

I have the a seperate directory for my process-conf XML "D:\SFDC\DataLoader\conf"

When I run the job I use the following Batch File that changes the directotry to the BIN folder for the data loader then calls the ectract process that is located in the CONF directory.


The BAT File I run has the following 2 lines:

CD "C:\Program Files\salesforce.com\Apex Data Loader 13.0\bin\"
Call process D:\SFDC\DataLoader\conf MDRAccountExtractProcess


=============================================================

Hope this helps.

Mike
This was selected as the best answer