tSalesforceGetDeleted - 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

Function

tSalesforceGetDeleted recovers deleted data from a Salesforce object over a given period of time.

Purpose

This component can collect the deleted data from a Salesforce object during a specific period of time.

tSalesforceGetDeleted properties

Component family

Business/Cloud

Basic settings

Property Type

Either Built-In or Repository.

  • Built-In: No property data stored centrally.

  • Repository: Select the repository file where the properties are stored.

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.

  • Basic: select this option to access Salesforce.com by entering your user ID and password. With this option selected, you need to specify the following properties:

    • User Id: the ID of the user in Salesforce.

    • Password: the password associated with the user ID.

    • Security Key: the security token.

  • OAuth: select this option to access Salesforce.com by entering your consumer key and consumer secret. This way, your user name and password will not be exposed, but extra work is required:

    With this option selected, you need to specify the following properties:

    • Client Id and Client Secret: the OAuth consumer key and consumer secret, which are available in the OAuth Settings area of the Connected App that you have created at Salesforce.com.

    • Callback Host and Callback Port: the OAuth authentication callback URL. This URL (both host and port) is defined during the creation of a Connected App and will be shown in the OAuth Settings area of the Connected App.

    • Token File: the path to the token file that stores the refresh token used to get the access token without authorization.

 

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:

  • View schema: choose this option to view the schema only.

  • Change to built-in property: choose this option to change the schema to Built-in for local changes.

  • Update repository connection: choose this option to change the schema stored in the repository and decide whether to propagate the changes to all the Jobs upon completion. If you just want to propagate the changes to the current Job, you can select No upon completion and choose this schema metadata again in the [Repository Content] window.

Click Sync columns to retrieve the schema from the previous component connected in the Job.

 

Start Date

Click the [...] button next to the field and in the calendar dialog box displayed, select the date and time to collect only the data deleted since the specified time.

Note that you can collect only the data deleted in the past 30 days.

 

End Date

Click the [...] button next to the field and in the calendar dialog box displayed, select the date and time to collect only the data deleted before the specified time.

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.

 

Use HTTP Chunked

Select this check box to use the HTTP chunked data transfer mechanism.

 

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.

 

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.

 

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

Scenario: Recovering deleted data from the Salesforce server

This scenario describes a two-component Job that collects the deleted account data over the past five days from the Salesforce server.

Setting up the Job

  1. Create a new Job and add a tSalesforceGetDeleted component and a tLogRow component by typing their names on the design workspace or dropping them from the Palette.

  2. Connect the tSalesforceGetDeleted component to the tLogRow component using a Row > Main connection.

Configuring the components

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

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

  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.

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

  4. Click the [...] button next to the Start Date field and in the pop-up calendar dialog box, set the value of the start date and time to collect only the data deleted since the specified time. In this example, it is 2016-06-08 00:00:00.

    Do the same to set the value of the end date and time in the End Date field to collect only the data deleted before the specified time. In this example, it is 2016-06-13 00:00:00.

  5. Double-click tLogRow to open its Basic settings view.

  6. Click Sync columns to retrieve the schema from the preceding component.

  7. In the Mode area, select Vertical (each row is a key/value list) to display the results in a tabular form on the console.

Executing the Job

  1. Press Ctrl + S to save your Job.

  2. Press F6 to run your Job.

    As shown above, the data deleted during the past five days is collected and displayed in a tabular form on the console.