- Double-click the third tSalesforceInput component to open its Basic settings view on the Component tab.
- Select the component that will create the Salesforce connection from the Connection Component drop-down list, tSalesforceConnection_1 in this example.
- Click the [...] button next to the Module Name field and in the pop-up dialog box, select the object from which data will be retrieved, Contact in this example. The schema of the Contact object will be automatically filled.
Click the [...] button next to Edit
schema and in the pop-up dialog box, remove all schema columns
except the four columns Name,
Phone, Email, and
Add another two columns to retrieve name and external ID of the linked Account
object, Contact_Account_Name and
To retrieve data of a linked object column, it is necessary to define the name of the column in a particular manner in the schema editor. The correct syntax is
NameofCurrentObject_NameofLinkedObject_NameofColumnofInterest. If this syntax is not respected, data from the linked object will not be returned. For more information about how to set schema for the relationship query, see How to set schema for the guess query feature of tSalesforceInput.
- Click OK to save the changes. In the pop-up dialog box, click Yes to propagate the schema to the next tLogRow component.
- Select Query from the Query Mode drop-down list.
Select the Manual Query check box and click the
Guess query button to generate the SOQL query based
on the defined module name and schema columns. The generated SOQL query will
look like below.
SELECT Name, Phone, Email, talendlena__Contact_Talend_ID__c, Contact.Account.Name, Contact_Account_talendlena__Account_External_ID__c FROM Contact
In the generated SOQL query string, replace each underscore character after the
object name in the column name
with a dot character. Then add the WHERE condition clause used to filter data to
be retrieved at the end of the generated SOQL query. In this example, it is
talendlena__Contact_Talend_ID__c like '201801%' and
all Salesforce Contact records whose
talendlena__Contact_Talend_ID__c field begins with
201801 will be retrieved. The updated SOQL query will
look like below.
SELECT Name, Phone, Email, talendlena__Contact_Talend_ID__c, Contact.Account.Name, Contact.Account.talendlena__Account_External_ID__c FROM Contact WHERE talendlena__Contact_Talend_ID__c like '201801%'
- Double-click the fourth tLogRow component and on its Basic settings view, select Table in the Mode area to display the result in a table.