August 17, 2023

tSalesforceGetDeleted – Docs for ESB 5.x

tSalesforceGetDeleted

tSalesforceGetDeleted_icon32_white.png

tSalesforceGetDeleted properties

Component family

Business/Cloud

 

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.

Basic settings

Use an existing connection

Select this check box and in the Component List click the
relevant connection component to reuse the connection details you already defined.

Note

When a Job contains the parent Job and the child Job, Component
list
presents only the connection components in the same Job
level.

 

Login Type

Two options are available:

Basic: select this option to log
in to Salesforce.com by entering your Username/Password on tSalesforceConnection.

OAuth2: select this option to
access Salesforce.com by entering your Consumer key/Consumer Secret
on tSalesforceConnection. This way,
your Username/Password will not be exposed to tSalesforceConnection but extra work is required:

 

Salesforce Webservice URL

Enter the Webservice URL required to connect to the Salesforce
database.

 

Salesforce Version

Enter the Salesforce version you are using.

 

Username and
Password

Enter your Web service authentication details.

To enter the password, click the […] button next to the
password field, and then in the pop-up dialog box enter the password between double quotes
and click OK to save the settings.

 

Consumer Key and Consumer
Secret

Enter your OAuth authentication details. Such information is
available in the OAuth Settings
area of the Connected App that you have created at
Salesforce.com.

To enter the consumer secret, click the […] button next
to the consumer secret field, and then in the pop-up dialog box enter the consumer secret
between double quotes and click OK to save the
settings.

For what a Connected App is, see Connected Apps. For how to create a Connected App, see
Defining Remote Access Applications.

 

Callback Host and Callback
Port

Enter your 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

Enter the token file name. It stores the refresh token that is
used to get the access token without authorization.

 

Timeout (milliseconds)

Type in the intended number of query timeout in
Salesforce.com.

 

Module

Select the relevant module in the list.

Note

If you select the Custom
module
option, you display the Custom Module Name field where you
can enter the name of the module you want to connect to.

 

Schema and Edit
Schema

A schema is a row description. It defines the number of fields 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

Type in between double quotes the date at which you want to start
the search. Use the following date format: “yyyy-MM-dd
HH:mm:ss”.

Note

You can do the search only on the past 30 days.

 

End Date

Type in between double quotes the date at which you want to end
the search. Use the following date format:”yyyy-MM-dd
HH:mm:ss”.

Advanced settings

Use Soap Compression

Select this check box to activate the SOAP compression.

Note

The compression of SOAP messages optimizes system
performance.

 

Client ID

Set the ID of the real user to differentiate between those who use
the same account and password to access the Salesforce
website.

 

tStatCatcher Statistics

Select this check box to gather the Job processing metadata at a
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

You can use this component as an output component. tSalesforceGetDeleted requires an input
component.

Log4j

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 data over the
past 5 days from the Salesforce server.

Use_Case_tSalesforceGetDeleted1.png

Setting up the Job

  1. Drop tSalesforceGetDeleted and tLogRow from the Palette onto the design workspace.

  2. Connect the two components together using a Row > Main
    connection.

Setting up the connection to the Salesforce server

  1. Double-click tSalesforceGetDeleted to
    display its Basic settings view and define
    the component properties.

    Use_Case_tSalesforceGetDeleted2.png
  2. In the Salesforce WebService URL filed,
    use the by-default URL of the Salesforce Web service or enter the URL you
    want to access.

  3. In the Username and Password fields, enter your login and password for the Web
    service.

  4. From the Module list, select the object
    you want to access, Account in this
    example.

Setting the search condition

  1. From the Schema list, select Repository and then click the three-dot button to
    open a dialog box where you can select the repository schema you want to use
    for this component. If you have not defined your schema locally in the
    metadata, select Built-in from the
    Schema list and then click the
    three-dot button next to the Edit schema
    field to open the dialog box where you can set the schema manually.

  2. In the Start Date and End Date fields, enter respectively the start and
    end dates for collecting the deleted data using the following date format:
    yyyy-MM-dd HH:mm:ss“. You can collect deleted data
    over the past 30 days. In this example, we want to recover deleted data over
    the past 5 days.

Job execution

  1. Double-click tLogRow to display its
    Basic settings view and define the
    component properties.

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

  3. In the Mode area, select Vertical to display the results in a tabular form
    on the console.

  4. Press Ctrl+S to save your Job and press
    F6 to execute it.

    Use_Case_tSalesforceGetDeleted3.png

    Deleted data collected by the tSalesforceGetDeleted component is displayed in a tabular
    form on the console.


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x