tSalesforceConnection
tSalesforceConnection Standard properties
These properties are used to configure tSalesforceConnection
running in the Standard Job framework.
The Standard
tSalesforceConnection component belongs to the Business and the Cloud families.
The component in this framework is available in all Talend
products.
Basic settings
|
Property Type |
Select the way the connection details
|
|
Connection type |
Select the type of the connection from the drop-down list. The
|
|
User Id |
The Salesforce username. This property is available |
|
Password |
The Salesforce password associated with the username. This property is available |
|
Security Token |
The Salesforce security token. For more information, see Reset Your Security Token. This property is available |
|
Issuer |
The OAuth Consumer Key, generated This property is available only |
|
Subject |
The Salesforce username. This property is available only |
|
Audience |
Json Web Token audience. You can set your own Json Web Token This property is available only |
|
Expiration time (in seconds) |
The expiration time of the assertion (in seconds) within five This property is available only |
|
Key store |
The path to the keystore file in Java Keystore (JKS) format. The keystore file can be generated by creating a certificate signed by This property is available only |
|
Key store password |
The keystore password. This property is available only |
|
Certificate alias |
The unique name of the certificate signed by Salesforce. This property is available only |
|
Client Id |
The OAuth Consumer Key, generated This property is available |
|
Client Secret |
The OAuth Consumer Secret, generated when your connected app is This property is available |
|
Callback Host |
The host value in the OAuth authentication callback URL that is This property is available |
|
Callback Port |
The port value in the OAuth authentication callback URL that is This property is available |
|
Token File |
The path to the token file that stores the refresh token used to get This property is available |
Advanced settings
|
Salesforce URL |
The Webservice URL required to connect to Salesforce. |
|
API version |
The Salesforce API version. This property is available only when the |
|
Bulk Connection |
Select this check box if you need to use bulk data processing |
|
Use or save the connection |
Select this check box and in the Session This session file can be shared by different Jobs to retrieve a When an expired session is detected, if the correct connection This property is available |
|
Need compression |
Select this check box to activate SOAP message compression, which can |
|
Use Http Chunked |
Select this check box to use the This property |
|
Trace HTTP message |
Select this check box to This |
|
Client Id |
Enter the ID of the real user to differentiate between those who use |
|
Timeout |
Enter the intended number of query timeout in milliseconds in |
|
Use Proxy |
Select this check box to use a proxy server, and in the Host, Port, |
|
tStatCatcher Statistics |
Select this check box to gather the Job processing metadata at the Job level |
Global Variables
|
ERROR_MESSAGE |
The error message generated by the component when an error occurs. This is an After |
Usage
|
Usage rule |
This component is more commonly used with other Salesforce components. |
Connecting to Salesforce using OAuth implicit flow to authenticate the user
(deprecated)
In this scenario, the OAuth2 (Open
Authorization 2.0) method is adopted to authorize tSalesforceConnection to access the Salesforce resources. This way, better
security is achieved as users do not need entering their Salesforce username/password directly
on tSalesforceConnection, which is required by the
Basic login type instead.
Setting up the Job
-
Drop a tSalesforceConnection component, a
tFixedFlowInput component and a tSalesforceOutput component onto the
workspace. -
Link the tFixedFlowInput component to the
tSalesforceOutput component using a
Row > Main
connection. -
Link the tSalesforceConnection component to
the tFixedFlowInput component using a Trigger > OnSubjobOk
connection.
Configuring the components
-
Double-click the tSalesforceConnection component to open its Basic settings view.
-
Select OAuth from the
Connection type drop-down list and Implicit
Flow from the Oauth2 flow type drop-down
list. -
In the Client Id and Client Secret
fields, enter the key and secret used by the consumer to access Salesforce
respectively. -
In the Callback Host and Callback
Port fields, enter the callback host and port information
respectively. -
In the Token File field, browse to or enter
the path to the token file that stores the refresh token used by the OAuth-enabled
connected app to obtain new sessions without requiring the user to provide their
credentials. -
Double-click the tFixedFlowInput component to open its Basic settings view.
-
Click the […] button next
to Edit schema and in the pop-up schema dialog
box, define the schema by adding one column Name of String
type. When done, click OK to save the changes
and close the dialog box.
-
In the Mode area, select
Use Inline Content (delimited file). Then
in the Content field displayed, enter the data
to be written into Salesforce. For example, Talend. -
Double-click the tSalesforceOutput component to open its Basic settings view.
-
Select the tSalesforceConnection component from the Connection
Component drop-down list to reuse the connection created by it. -
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. -
Click the […] button next
to Edit schema to open the schema dialog box.
On the right side of the panel, remove all the columns except the column
Name. When done, click OK to save
the changes and close the dialog box.
Executing the Job
- Press Ctrl + S to save the Job.
-
Press F6 to run the Job. The Studio console
gives the URL (in yellow) for OAuth authorization.
-
Copy the URL to the browser’s address bar. The Salesforce.com login page
appears.
-
Fill up the username and password and click Log in to
Salesforce.The authorization response is then shown on the browser at the callback
host.
-
Now is the time for the Job to continue running.
As shown above, the Job is successfully executed. -
Go to the Salesforce.com and check the Account object. You can find that the
account whose name is Talend is
inserted.