Function |
tSalesforceInput connects to an object of a Salesforce database via the relevant Web service. | |
Purpose |
Allows to extract data from a Salesforce DB based on a query. |
Component family |
Business/Cloud |
|
Basic settings |
Property Type |
Either Built-In or Repository.
Since version 5.6, both the Built-In mode and the Repository mode are available in any of the Talend solutions. |
|
Connection |
Select the component whose connection details will be used to set up the connection. |
|
Connection type |
Select the type of the connection from the drop-down list, either Basic or OAuth.
|
|
Module Name |
Click the [...] button next to the field and in the dialog box displayed, select the module that will be used or select the Use custom object check box and specify the module name in the Object Name field. |
|
Schema and Edit schema |
A schema is a row description. It defines the number of fields (columns) to be processed and passed on to the next component. The schema is either Built-In or stored remotely in the Repository. Since version 5.6, both the Built-In mode and the Repository mode are available in any of the Talend solutions. Click Edit schema to make changes to the schema. If the current schema is of the Repository type, three options are available:
In this component the schema is related to the Module selected. Warning
To retrieve a column from a linked module it
is necessary to define the column in a particular manner in
the Edit schema view,
otherwise the relationship query will not work. The correct
syntax is:
|
|
Query Mode |
Select the query mode from the drop-down list, either Query or Bulk.
|
|
Condition |
Enter the query used to select the data to be extracted between double quotation marks, for example, "name='Talend'" or "name like '%talend_user%'". This field is not available when the Manual Query check box is selected. |
|
Manual Query |
Select this check box and in the Full SOQL query string field displayed, enter the full SOQL (Salesforce Object Query Language) statement used to select the data to be retrieved between double quotation marks. For more information about the SOQL, see Salesforce Object Query Language (SOQL). |
|
Include deleted records |
Select this check box to query all the records, including the deleted ones. This check box is available only when Query is selected from the Query Mode drop-down list. |
Advanced settings |
Salesforce URL |
Enter the Webservice URL required to connect to the Salesforce database. |
|
Need compression |
Select this check box to activate SOAP message compression, which can result in increased performance levels. |
|
Trace HTTP message |
Select this check box to output the HTTP interactions on the console. This check box is available only when Bulk is selected from the Query Mode drop-down list. |
|
Use HTTP Chunked |
Select this check box to use the HTTP chunked data transfer mechanism. This check box is available only when Query is selected from the Query Mode drop-down list. |
|
Client Id |
Enter the ID of the real user to differentiate between those who use the same account and password to access the Salesforce website. This field is available only when Query is selected from the Query Mode drop-down list. |
|
Timeout (milliseconds) |
Enter the intended number of query timeout in Salesforce.com. |
|
Use Proxy |
Select this check box to use a proxy server, and in the Host, Port, User Id, and Password fields displayed, specify the connection parameters of the proxy server. |
|
Batch Size |
Enter the number of registrations in each processed batch. This field is available only when Query is selected from the Query Mode drop-down list. |
|
Normalize Delimiter |
Enter the characters, strings or regular expressions used to normalize the data that is collected by queries set on different hierarchical Salesforce objects. This field is available only when Query is selected from the Query Mode drop-down list. |
|
Column Name Delimiter |
Enter the characters, strings or regular expressions used to separate the name of the parent object from the name of the child object when you use a query on the hierarchical relations among the different Salesforce objects. This field is available only when Query is selected from the Query Mode drop-down list. |
|
tStatCatcher Statistics |
Select this check box to gather the Job processing metadata at the Job level as well as at each component level. |
Global Variables |
NB_LINE: the number of rows read by an input component or transferred to an output component. This is an After variable and it returns an integer. ERROR_MESSAGE: the error message generated by the component when an error occurs. This is an After variable and it returns a string. This variable functions only if the Die on error check box is cleared, if the component has this check box. A Flow variable functions during the execution of a component while an After variable functions after the execution of the component. To fill up a field or expression with a variable, press Ctrl + Space to access the variable list and choose the variable to use from it. For further information about variables, see Talend Studio User Guide. | |
Usage |
This component is usually used as a start component of a Job or Subjob and it always needs an output link. | |
Log4j |
If you are using a subscription-based version of the Studio, the activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User Guide. For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html. | |
Limitation |
n/a |
This scenario describes a two-component Job used to extract a specific set of data from an object in a Salesforce database.
Create a new Job and add a tSalesforceInput component and a tLogRow component by typing their names on the design workspace or dropping them from the Palette.
Connect the tSalesforceInput component to the tLogRow component using a Row > Main connection.
Double-click the tSalesforceInput 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.
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 Opportunity.
Click the [...] button next to Edit schema to open the schema dialog box.
Remove all columns except Id, Name, IsWon, and Fiscal Year. Then add another column Opportunity_Account_Name of String type.
Note that to retrieve a column from a linked object, 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
. Hence, in this example, to retrieve the Name column in the Account object, the name of the fifth column must be Opportunity_Account_Name. If this syntax is not respected, the data from the linked object will not be returned.Click OK to save the changes and close the schema dialog box.
Select the Manual Query check box and in the Full SOQL query string field displayed, enter your SOQL statement used to search the data to be retrieved. In this example, the statement is as follows:
SELECT Id, Name, IsWon, FiscalYear, Account.Name FROM Opportunity
Note that to return a column from a linked object, the correct syntax of the column name in a SOQL statement is
NameofCurrentObject.NameofColumnofInterest
. Hence, in this example, the fifth column name in the SOQL statement is Account.Name.Double-click the 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 result.