Scenario 4: Upserting the Contact object based on mapping relationships with the external IDs in the Account object - 6.3

Talend Open Studio for Big Data Components Reference Guide

EnrichVersion
6.3
EnrichProdName
Talend Open Studio for Big Data
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

This scenario upserts the records in the Contact object based on mapping (matching) against the external IDs in the Account object.

Setting up the Job

  1. Create a new Job and add a tSalesforceConnection component, two tFixedFlowInput components, two tSalesforceInput components, two tSalesforceOutput components and two tLogRow components by typing their names on the design workspace or dropping them from the Palette.

  2. Link the first tFixedFlowInput component to the first tSalesforceOutput component using a Row > Main connection.

  3. Do the same to link the first tSalesforceInput component to the first tLogRow component, the second tFixedFlowInput component to the second tSalesforceOutput component, and the second tSalesforceInput component to the second tLogRow component.

  4. Link the tSalesforceConnection component to the first tFixedFlowInput component using a Trigger > OnSubjobOk connection.

  5. Do the same to link the first tFixedFlowInput component to the first tSalesforceInput component, the first tSalesforceInput component to the second tFixedFlowInput component, and the second tFixedFlowInput component to the second tSalesforceInput component.

Configuring the components

Connecting to Salesforce

  • Double-click the tSalesforceConnection component to open its Basic settings view.

    In the User Id, Password and Security Key fields, enter the user authentication information required to access Salesforce.

Inserting the external ID values into the Account object

  1. Double-click the first tFixedFlowInput component to open its Basic settings view.

  2. Click the [...] button next to Edit schema and in the pop-up schema dialog box, define the schema by adding three columns Name, AccountID__c and AccountBizLicense__c of String type.

    Note that AccountID__c and AccountBizLicense__c are customized fields in the Account object, with the attribute of external ID.

    Click OK to save the changes and close the dialog box.

  3. In the Mode area, select Use Inline Content (delimited file) and enter the data below in the Content field.

    Google;US666;C.A.666
    Talend;FR888;Paris888
  4. Double-click the first tSalesforceOutput component to open its Basic settings view.

  5. In the drop-down list next to the Property Type drop-down list, select the tSalesforceConnection component to reuse the connection created by it.

  6. Click the [...] button next to the Module Name field and in the pop-up dialog box, select the object you want to access. In this example, it is Account.

Retrieving the external ID values from the Account object

  1. Double-click the first tSalesforceInput component to open its Basic settings view.

  2. In the drop-down list next to the Property Type drop-down list, select the tSalesforceConnection component to reuse the connection created by it.

  3. Click the [...] button next to the Module Name field and in the pop-up dialog box, select the object you want to access. In this example, it is Account.

  4. Click the [...] button next to Edit schema and in the pop-up schema dialog box, define the schema by adding three columns Name, AccountID__c and AccountBizLicense__c of String type, same as the schema of the first tFixedFlowInput component.

    Click OK to save the changes and close the dialog box.

  5. In the Condition field, enter the filter statement between double quotation marks. In this example, it is "name like 'Tal%' OR name like 'Goo%'".

  6. Double-click the first tLogRow component to open its Basic settings view.

    In the Mode area, select Table (print values in cells of a table) for better readability of the results.

Upserting the emails into the Contact object upon the external ID matching

  1. Double-click the second tFixedFlowInput component to open its Basic settings view.