• sadhasivam
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

Hi Friends,

 

We are trying to levarage salesforce winter 13 release static resource based csv driven test case data setup. Would like to know  few things

 

1. how to establish foreign key relationship in the static resource. ?

2. single csv static resource can have data-set related to a table ? for,.eg) if we have 3 custom table then we need to have 3 different csv static resource loaded to load data is it. 

3. is there any govenor limits in providing the data set. if so where can is see the limits information. 

 

Hi

i am trying to extract data from salesforce and write to the table directly. i am using MySQL  database with the following jars in classpath.

1. Dataloader.jar ( version 23.0)

2. commons-collections-3.2.1.jar

3. commons-dbcp-1.4.jar

4. mysql-connector-java-5.1.17.jar

 

i am getting spring error  "Failed to convert property value of type [org.apache.commons.collections.map.LinkedMap] to required type [java.util.HashMap] for property 'sqlParam"

 

following are my configurations.

 

1. process-conf.xml

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
        <bean id="memberSummary" class="com.salesforce.dataloader.process.ProcessRunner" singleton="false">
                <description>Daily KPM - MemberSummary</description>
                <property name="name" value="memberSummary"/>
                <property name="configOverrideMap">
                        <map>
                                <entry key="dataAccess.name" value="c:\Shoprunner\root.code\srwebsite\cron\DailyKPMReport\memberSummary.csv"/>
                                <entry key="dataAccess.readUTF8" value="true"/>
                                <entry key="dataAccess.writeBatchSize" value="1" />
                                <entry key="dataAccess.writeUTF8" value="true"/>
                                
                                <!-- <entry key="dataAccess.type" value="csvWrite"/> -->  
                				<entry key="dataAccess.type" value="databaseWrite"/>
                				<entry key="dataAccess.name" value="memberSummary"/>
                
                                <entry key="process.enableExtractSuccessOutput" value="true"/>
                                <entry key="process.enableLastRunOutput" value="true"/>
                                <entry key="process.lastRunOutputDirectory" value="c:\Shoprunner\root.code\srwebsite\cron\DailyKPMReport\log"/>
                                <entry key="process.operation" value="extract"/>
                                <entry key="process.statusOutputDirectory" value="c:\Shoprunner\root.code\srwebsite\cron\DailyKPMReport\log"/>
                                <entry key="process.initialLastRunDate" value="2011-11-21T00:00:00.000-0800"/>
                                <entry key="process.mappingfile" value="c:\Shoprunner\root.code\srwebsite\cron\conf\DailyKPMReport\memberSummary.mdl"/>
                                
                                
                                <entry key="sfdc.extractionRequestSize" value="1" />
                                <entry key="sfdc.bulkApiCheckStatusInterval" value="5000"/>
                                <entry key="sfdc.bulkApiSerialMode" value="50000"/>
                                <entry key="sfdc.debugMessages" value="true"/>
                                <entry key="sfdc.debugMessagesFile"   value="c:\Shoprunner\root.code\srwebsite\cron\DailyKPMReport\log\memberSummarySoapTrace.log"/>
                                <entry key="sfdc.enableRetries" value="true"/>
                                <entry key="sfdc.entity" value="Snapshot_Member_Summary__c"/>
                                <entry key="sfdc.extractionRequestSize" value="200"/>
                                <entry key="sfdc.insertNulls" value="false"/>
                                <entry key="sfdc.loadBatchSize" value="200"/>
                                <entry key="sfdc.minRetrySleepSecs" value="2"/>
                                <entry key="sfdc.noCompression" value="false"/>
                                <entry key="sfdc.timeoutSecs" value="60"/>
                                <entry key="sfdc.useBulkApi" value="true"/>
                                <entry key="sfdc.extractionSOQL">
                                	<value><![CDATA[
                                Select Id, Type_Of_Membership__c, 
                                       Member_Count__c, Snapshot_Date__c
  								  From Snapshot_Member_Summary__c
 								 where Snapshot_Date__c = TODAY
 								 ]]>
                                	</value>
                                </entry>
                                
                      </map>
                </property>
        </bean>

 

2. database-conf.xml

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>

<bean id="memberSummary"
      class="com.salesforce.dataloader.dao.database.DatabaseConfig"
      singleton="true">
    <property name="sqlConfig"  ref="memberSummaryQuery"/>
    <property name="dataSource" ref="frDataSource"/>
</bean>

<bean id="memberSummaryQuery"
      class="com.salesforce.dataloader.dao.database.SqlConfig" singleton="true">
    <property name="sqlString">
        <value>
            INSERT INTO member_summary (
               ID, TYPE_OF_MEMBERSHIP__C, MEMBER_COUNT__C, SNAPSHOT_DATE__C)
            VALUES (@id@::numeric, @Type_Of_Membership@, @Member_Count@::numeric, @SnapShot_Date@ )
        </value>
    </property>
    <property name="sqlParams">
        <map>
            <entry key="id"               value="java.lang.String"/>
            <entry key="Type_Of_Membership" value="java.lang.String"/>
            <entry key="Member_Count"      value="integer"/>
            <entry key="SnapShot_Date"     value="java.sql.Date"/>
        </map>
    </property>
</bean>
<bean id="frDataSource" class="org.apache.commons.dbcp.BasicDataSource">
		<property name="driverClass" value="com.mysql.jdbc.Driver" />
		<property name="jdbcUrl" value="jdbc:mysql://localhost/financerunner" />
		<property name="user" value="xxxxxxxx" />
		<property name="password" value="xxxxxx" />
		<property name="initialPoolSize" value="5"></property>
		<property name="minPoolSize" value="50"></property>
		<property name="maxPoolSize" value="200"></property>
		<property name="checkoutTimeout" value="1000"/>
</bean>

</beans>

 

3. sdl mapping file.

ID=Id
TYPE_OF_MEMBERSHIP__C=Type_Of_Membership
MEMBER_COUNT__C=Member_Count
SNAPSHOT_DATE__C=SnapShot_Date

 4. way i am invoking dataloader.

 

java -cp %DLPATH%;%DB_DRIVER%;%CLASSPATH%;.; -Dsalesforce.config.dir=%DLCONF% com.salesforce.dataloader.process.ProcessRunner process.name=memberSummary

 

HI.

 

I am following the Warehouse app Tutorial.

I am at Tutorial #7.

Just finished down-loading the Force.com IDE but don't know how to create a project.

The instruction are saying to select FILe->New but under File the only options I am getting are: Exit, Open File and Convert Line delimiters to...

 

Help will be much appreciated!

 

New to SF

Hi,

 

I am trying to upsert the records from MySQL to Salesforce.com using Data Loader command Line Interpreter(CLI). There are 3 records in MySql table and during upsert 3 empty records are getting inserted in Salesforce Object but custom fields content is not getting inserted. Using .csvfile I am able to do that.

 

Please find process-conf and database-conf files below :

 

Process-Conf file:

<bean id="SFAProcess"
          class="com.salesforce.dataloader.process.ProcessRunner"
          singleton="false">
        <description>AccountMaster job gets the Customer record updates from ERP (Oracle financials) and uploads them to salesforce using 'upsert'.</description>
        <property name="name" value="SFAProcess"/>
        <property name="configOverrideMap">
            <map>
                <entry key="sfdc.debugMessages" value="true"/>
                <entry key="sfdc.debugMessagesFile" value="c:\dataloader\samples\status\accountMasterSoapTrace.log"/>

                <entry key="sfdc.endpoint" value="https://www.salesforce.com"/>
                <entry key="sfdc.username" value="sam@co.com.beta"/>
                <entry key="sfdc.password" value="cf644d195b9f45cddf7054e686c35921c0497a0e96867fe689"/>
                <entry key="sfdc.timeoutSecs" value="600"/>
                <entry key="sfdc.loadBatchSize" value="200"/>
                <entry key="sfdc.externalIdField" value="SF_Id__c"/>
                <entry key="sfdc.entity" value="SFA_Test__c"/>
                <entry key="process.operation" value="upsert"/>
                <entry key="process.mappingFile" value="C:\Program Files\salesforce.com\Apex Data Loader 17.0\conf\accountMasterMap.sdl"/>
                <entry key="dataAccess.name" value="C:\Program Files\salesforce.com\Apex Data Loader 17.0\extract.csv"/>
                <entry key="dataAccess.type" value="csvRead"/>
            </map>
        </property>
    </bean>
   

database-conf file:

<bean id="dbDataSource" class="org.apache.commons.dbcp.BasicDataSource"
      destroy-method="close">
    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
    <property name="url" value="jdbc:mysql://10.195.70.101:3306/SFA_Test"/>
    <property name="username" value="SFA"/>
    <property name="password" value="SFA"/>
</bean>

<bean id="querySFATestAll"
      class="com.salesforce.dataloader.dao.database.DatabaseConfig"
      singleton="true">
    <property name="sqlConfig" ref="querySFA_testAllSql"/>
    <property name="dataSource" ref="dbDataSource"/>
</bean>

<bean id="querySFA_testAllSql"
      class="com.salesforce.dataloader.dao.database.SqlConfig" singleton="true">
    <property name="sqlString">
        <value>
            SELECT NAME, NUMBER, ID FROM SFA_Test.SFA_TEST
        </value>
    </property>
    <property name="columnNames">
        <list>
            <value>Name</value>
            <value>Number</value>
            <value>ID</value>
           
        </list>
    </property>
</bean>

 

Mapping file:

 

#Mapping values
#Fri Mar 05 10:04:53 EST 2010
OWNERID=
CREATEDDATE=
ISDELETED=
SNAME__C=SName__c
LASTMODIFIEDBYID=
ID=Id
SF_ID__C=SF_Id__c
CREATEDBYID=
SYSTEMMODSTAMP=
NUMBER__C=Number__c
LASTMODIFIEDDATE=
NAME=
 

In the log file Success.csv it says success by giving the salesforce Id for the records in MySQL.

 

Please someone help me... Thanks in advance.