• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Salesforce related records on csv bulk upsert

#1 2012-04-19 23:24:01

elcalvomike
Member
Registered: 2012-04-03
Posts: 37

Salesforce related records on csv bulk upsert

I finally found the format for related record id upserts into salesforce but running into an issue.
I need to have a column name in the output schema like 'Account.ExternalKeyName' that gets saved to the CSV.
Salesforce will recognize (i hope) this and lookup the correct SFId from this if I put the correct external value in this field.

Can't create a column name in the schema with a . in it.

Any ideas on a work around?

Thanks all.

Mike


Uploaded Images

Last edited by elcalvomike (2012-04-19 23:26:31)

Offline

#2 2012-04-20 00:23:27

vgalopin
Talend team
Registered: 2009-04-15
Posts: 442
Website

Re: Salesforce related records on csv bulk upsert

Hi Mike,

Try replacing it with a "_"


Vincent Galopin
US Pre-Sales Consultant
Talend US

Offline

#3 2012-04-20 14:24:56

elcalvomike
Member
Registered: 2012-04-03
Posts: 37

Re: Salesforce related records on csv bulk upsert

Thanks vgalopin.
Getting invalid batch exception.
I guess I could output to a CSV and then replace the column name in the file with a tJava string replacement.

.------+---------+-----------+----------------------------+--------------------.
|                                  tLogRow_1                                   |
|=-----+---------+-----------+----------------------------+-------------------neutral
|custid|FirstName|LastName   |Email                       |Account_XM_CustID__c|
|=-----+---------+-----------+----------------------------+-------------------neutral
|526136|Scott    |Peters     |john.seymour@ang.af.mil     |526136              |
|94878 |Larry    |Hendrickson|larry_hendrickson@crpusd.org|94878               |
|521872|chris    |gardini    |cgardini@avanttechnology.com|521872              |
'------+---------+-----------+----------------------------+--------------------'
Exception in component tSalesforceOutputBulkExec_1_tSBE
[AsyncApiException  exceptionCode='InvalidBatch'
exceptionMessage='Records not processed'
]

    at com.sforce.async.BulkConnection.parseAndThrowException(BulkConnection.java:108)
    at com.sforce.async.BulkConnection.doHttpGet(BulkConnection.java:472)
    at com.sforce.async.BulkConnection.getBatchResultStream(BulkConnection.java:369)
    at org.talend.salesforceBulk.SalesforceBulkAPI.getBatchLog(SalesforceBulkAPI.java:327)
    at beta_test_sf_load_account.contactsupsert_nolookuptest_0_1.ContactsUpsert_nolookuptest.tMSSqlInput_1Process(ContactsUpsert_nolookuptest.java:4208)
    at beta_test_sf_load_account.contactsupsert_nolookuptest_0_1.ContactsUpsert_nolookuptest.tWarn_1Process(ContactsUpsert_nolookuptest.java:707)
    at beta_test_sf_load_account.contactsupsert_nolookuptest_0_1.ContactsUpsert_nolookuptest.runJobInTOS(ContactsUpsert_nolookuptest.java:5223)
    at beta_test_sf_load_account.contactsupsert_nolookuptest_0_1.ContactsUpsert_nolookuptest.main(ContactsUpsert_nolookuptest.java:4852)

Offline

#4 2012-04-20 14:40:56

elcalvomike
Member
Registered: 2012-04-03
Posts: 37

Re: Salesforce related records on csv bulk upsert

That did it.
I manually changed the CSV to Account.MYKEY and the bulk worked.
Now just need to find a way to change it with some Java code.

It would be nice if we could set the schema correctly with a . in a tMap.


Mike

Offline

#5 2012-04-20 16:36:41

vgalopin
Talend team
Registered: 2009-04-15
Posts: 442
Website

Re: Salesforce related records on csv bulk upsert

Good to know! Well you can make that as a feature request, but this is a java limitation, so I'm not sure we can do anything about it.


Vincent Galopin
US Pre-Sales Consultant
Talend US

Offline

#6 2012-04-20 23:07:23

elcalvomike
Member
Registered: 2012-04-03
Posts: 37

Re: Salesforce related records on csv bulk upsert

I did do that but you are right this is a bit of a java problem.
I guess I will try find and replace to augment the CSV files to include the . after the files are created.
Ill post any code success I have.

Offline

#7 2012-05-21 16:26:57

kkrupa
New member
Registered: 2012-05-15
Posts: 2

Re: Salesforce related records on csv bulk upsert

I have developed a fix for this issue in the tSalesforceOutputBulk component.  Forgive my ignorance on this but can someone point me to a link with the proper procedures for contributing the updated component back to the community?

Offline

#8 2012-05-21 17:51:30

kkrupa
New member
Registered: 2012-05-15
Posts: 2

Re: Salesforce related records on csv bulk upsert

Never mind, I decided to actually look into it. The link to the revised component is here:

http://www.talendforge.org/exchange/index.php?eid=531&product=tos&action=view

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Salesforce related records on csv bulk upsert

Board footer

Powered by FluxBB