ApatarForge
Apatar.com  |  Log In   

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    RegisterRegister 
  ProfileProfile     Log in to check your private messagesLog in to check your private messages    Log inLog in  

Salesforce contact creation from CSV

 
Post new topic   Reply to topic    Apatar Community Forums Forum Index -> Help
View previous topic :: View next topic  
Author Message
kils
Guest





PostPosted: Mon Feb 13, 2012 1:34 pm    Post subject: Salesforce contact creation from CSV Reply with quote

Hi All,

I have a CSV file which contains both contact and account information within the same row. I have to create both the account and related contact from CSV file

I have created a data map for account creation and it is working good.

CSV (account fields) -> Transform -> Salesforce (Account object)

The problem is when i have to create the related contact.

Salesforce(account) ---->
^>>Join----> Salesforce(contact)
CSV -> Transform - -^


I have used the join with inner join condition between some account fields ... but i am not able to find the matching results based on the join.

appreciate any help in configuring the join correctly. If you guys have alternative suggestions or solutions please suggest
Back to top
Sergei



Joined: 26 Jul 2007
Posts: 969

PostPosted: Tue Feb 14, 2012 9:40 am    Post subject: Re: Salesforce contact creation from CSV Reply with quote

kils wrote:

The problem is when i have to create the related contact.

Salesforce(account) ---->
^>>Join----> Salesforce(contact)
CSV -> Transform - -^


I have used the join with inner join condition between some account fields ... but i am not able to find the matching results based on the join.

appreciate any help in configuring the join correctly. If you guys have alternative suggestions or solutions please suggest


After .CSV file you need to use Transform to convert long text field to text field using to string function. Then you map transform to Join and you will be able to find matching results.

SFDC (account) ->
Join -> SFDC (contact)

CSV -> Transform ->^
_________________
Regards,
Sergei
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kils
Guest





PostPosted: Wed Feb 15, 2012 9:56 am    Post subject: Re: Salesforce contact creation from CSV Reply with quote

Hi Sergei


Thank you for the reply. I am facing the same issue after converting all the "long text" values to "text" in transform






The contact (CSV) - Transform - Salesforce (Account) : is working fine and is creating a new account



As assugested by you, i have added a transform between the CSV and the join and converted the value using "to string"





and in the "join on" i have mapped the csv values and account values





and in work i have mapped the value that are required to create the contact refreing the account id





Now when i click run the account is created but not the contact. can you Please see the error log and let me know what is the mistake i am doing
Thank you for the time




Code:


*********************************
Start date Wed Feb 15 14:36:52 IST 2012
Version Apatar_v1.12.23
JRE Version 1.6.0_13
JRE Vendor Sun Microsystems Inc.
Encoding Cp1252
log4j.configuration = `file:/C:/Program%20Files/Apatar/log4j.properties`
Start Reading from Contact.csv
Row '' has incorrect length.
Start Reading from Account
java.sql.SQLSyntaxErrorException: Syntax error: Encountered "name" at line 1, column 202.
   at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
   at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
   at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
   at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
   at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
   at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
   at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
   at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(Unknown Source)
   at com.apatar.core.DataBaseTools.executeSelect(DataBaseTools.java:1401)
   at com.apatar.join.JoinNode.Transform(JoinNode.java:224)
   at com.apatar.core.Runnable.execute(Runnable.java:272)
   at com.apatar.core.Runnable.execute(Runnable.java:250)
   at com.apatar.core.Runnable.execute(Runnable.java:244)
   at com.apatar.core.Runnable$Run.run(Runnable.java:118)
Caused by: java.sql.SQLException: Syntax error: Encountered "name" at line 1, column 202.
   at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
   at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
   ... 14 more
Caused by: ERROR 42X01: Syntax error: Encountered "name" at line 1, column 202.
   at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
   at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
   at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
   at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
   at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
   ... 8 more
Start Reading from Contact
Back to top
Sergei



Joined: 26 Jul 2007
Posts: 969

PostPosted: Wed Feb 15, 2012 3:17 pm    Post subject: Reply with quote

Hello,

Why your Join on condition contains 3 values? It would be enough to choose 1 value with a unique ID that matches in both sources. Then try to just preview results on the Join node to check if there are any records. NOTE: if you have created new account you need to delete Transform node between CSV and SFDC account table.
_________________
Regards,
Sergei
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Guest






PostPosted: Thu Feb 16, 2012 12:39 pm    Post subject: Reply with quote

Hi Sergei

the combination of 3 values is unique. If i choose 1 value for join then there will be duplicates

i am trying to create both the account and its related contact at the same time from the csv
Back to top
Sergei



Joined: 26 Jul 2007
Posts: 969

PostPosted: Thu Feb 16, 2012 1:02 pm    Post subject: Reply with quote

Anonymous wrote:
Hi Sergei

the combination of 3 values is unique. If i choose 1 value for join then there will be duplicates


Ok, then check if the field size is equal in each source.

Anonymous wrote:
i am trying to create both the account and its related contact at the same time from the csv


You mentioned that:
Quote:
The contact (CSV) - Transform - Salesforce (Account) : is working fine and is creating a new account


If so, then you need only to create contacts and associate them with created accounts. In this case to avoid duplicates in Account table you need to delete Transform node between CSV and SFDC account table, because you have already created accounts.
_________________
Regards,
Sergei
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Apatar Community Forums Forum Index -> Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group