I have the following objects with the respective fields in Salesforce:
Prospect__c Data_Migration_ID__c (External ID)
Marketing_Source__c Data_Migration_ID__c (External ID)
Lead_Source__c Data_Migration_ID__c (External ID) Prospect__c (reference to Prospect__c) Source__c (reference to Marketing_Source__c)
In my source data (CSV) for the Lead Source, I have the external IDs for the Prospect and the Marketing Source in Lead_Source__c.Prospect__c and Lead_Source__c.Source__c, respectively. I've followed the instructions at http://blog.wdcigroup.net/2013/10/talen … component/, along with whatever tips I have been able to find in the forums in order to load my Lead Source data. I can get it to work with the Data Loader, so I know that the data is valid. But whenever I run the job, I get the following output:
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:428)
at test.lead_source__c_0_1.Lead_Source__c.tFileInputDelimited_1Process(Lead_Source__c.java:2132)
at test.lead_source__c_0_1.Lead_Source__c.runJobInTOS(Lead_Source__c.java:2839)
at test.lead_source__c_0_1.Lead_Source__c.main(Lead_Source__c.java:2688)
I'm using Talend 5.5.1.r118616-20140617-1110
I found the answer.
The instructions at http://blog.wdcigroup.net/2013/10/talend-tsalesforceoutputbulkexec-component/ are correct, but I was referencing the wrong field.When the instructions say to go to the Advanced settings tab on the tSalesforceOutputBulkExec component, it says that "the ‘Lookup field name’ is the lookup field between the Contact and Account objects in the Salesforce. Hence, it will be the Account field in Contact object." I was using "Prospect__c" and "Source__c" as my lookup field names. I should have been using "Prospect__r" and "Source__r," as these appear to be the actual lookup fields--at least for these custom objects.
We used to have Pervasive, which allowed us to use the syntax "(Object:ExternalID:Value)" [so "(Prospect__c:Data_Migration_ID__c:1)", for example] as the value in an insert statement. I've never had to deal with reference fields, but I found some notes on them in some of the Salesforce developer blogs and forums and thought it would be worth a shot.