I'm just starting with Talend and I've been slogging through challenge after challenge in getting a contact CSV file from an SFTP site to then UPSERT into a Salesforce org.
I've used your wonderful site for much of that slogging, but there is one error where I've now hit a wall. And it is this:
Do you know if it could have something to do with me filling out only the Column Name is the "Relationship mapping for upsert" section of "Advanced settings" of the tSalesforceOutput component. Pictured here:
Any help is deeply appreciated.
Solved! Go to Solution.
There is 2 ways to establish relationship between chld and parent records using tSalesforceOutput (Bulk) component.
The 1rst one, you can use the value of the parent id to populate the relationship field of the child record record.
For example, put the account id into the accountid field of the contact record.
For that of course you have to know the id.
The 2nd one is to use the advanced setting to define the relatonship using the external id of the parent.
For that you need to indicate for each relationship the following information:
- Talend name of Talend Schema: the field name of the input schema
- Lookup relation field name: the relationship name in the child object - for custom object/field replace the "__c" terminaison by "__r"
- Module name: the object name for the parent object
- Polymorphic: reserved for certain object such as Task or Event (see Salesforce documentation)
- External id name: the field name of the parent object used to retrieved the desired record (must declared as an external id"
The magic with the 2nd approach is that you don't need to know the parent id, a "functional id" declared as external id is enough.
Here is what it should look like for the standard relationship between Account and Contact:
Hope this help.
Hi there and thank you for your help.
I now get a different error about "Duplicate Alert" that I cant resolve with Google either, because that shouldn't happen with the UPSERT function.
I'm not sure if I should continue in this question, or start a new one though, so I'll just continue for now and see where it goes.
The new error looks like this:
And this is what my map looks like:
What else am I missing for a the upsert to function?
The better, one question by subject and it should be nice if you could mark the question as solved (Kudo also accepted) as soon as you get the expected answer.
However, you probably have a duplicate rule on salesforce side which detect a duplicate record on the Contact object.
Try to deactivate this duplicate rule to confirm the job is OK in this case.
Then you have to decide if you have to deactivate it each time you run this job or if you have to detect the duplicates on Talend side too to avoid this error on salesforce side.