August 15, 2023

tActionInput (deprecated) – Docs for ESB 6.x

tActionInput (deprecated)

Transforms Talend Jobs into Step Integration Actions or Target Integration Actions which
are used to design Flows in the Cloud.

This component is placed at the beginning of a Job to
retrieve data from a previous step and to transmit it to the next step or to output it to
the target system.

tActionInput Standard properties

These properties are used to configure tActionInput running in the Standard Job framework.

The Standard
tActionInput component belongs to the Talend Cloud family.

This component is available in the Palette of the
Integration
perspective of the Studio only if you have subscribed
to one of the
Talend Platform
solutions or Big Data
solutions.

Basic settings

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.

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.

 

Built-In: You create and store the
schema locally for this component only. Related topic: see
Talend Studio

User Guide.

 

Repository: You have already created
the schema and stored it in the Repository. You can reuse it in various projects and
Job designs. Related topic: see
Talend Studio

User Guide.

Advanced settings

tStatCatcher Statistics

Select this check box to gather the Job processing metadata at the Job
level as well as at each component level.

Usage

Usage rule

This component is used with other components in the Talend Cloud family, especially with the
tActionOutput component, to design
Integration Actions. These Integration Actions can then be published to
the web application and used to design Flows in the Cloud.

Scenario 1: Filtering customer data (deprecated)

This scenario applies only to a subscription-based Talend Platform solution or Talend Data Fabric.

This scenario shows how to create a Step Integration Action which filters the customer
data downloaded from Dropbox by the Source Integration Action outlined in Scenario: Receiving data from an input flow and transmitting it for further processing (deprecated).

use_case-tactioninput_job.png

In this example:

  • The tActionInput component receives the data flow
    from the Source Integration Action and transmits it to the Job.

  • The tFilterRow component filters data based on
    the value in one of the columns.

  • The tActionOutput component receives the filtered
    data and transmits it to the next Integration Action.

  • The tActionReject component receives the rejected
    data.

  • The exception handling subjob, jCloudLog, enables
    you to define log information, collect exception data and transfer it to the Studio
    console or to
    Talend Integration Cloud
    web application during
    execution. For further information, see Configuring logs and exceptions.

Prerequisites:

Setting up the Step Integration Action

  1. Drop the following components from the Palette into the design workspace: tActionInput, tFilterRow, tActionOutput and tActionReject.
  2. Link tActionInput to tFilterRow using the Main link,
    tFilterRow to tActionOutput using the Filter link
    and tFilterRow to tActionReject using the Reject
    link.

Setting context parameters

You must define the parameters to connect to Dropbox and the parameter for the path
to the customer file you want to process. Both parameters are defined as context
parameters in this example. First because connection parameters must be context
parameters, otherwise you may have a compile error when you try to publish the
Integration Action to the Cloud. And second because context parameters are parameters
you can pass to the Integration Action at runtime by using context variables which value
you can change according to your needs.

This example assumes that you have imported the Cloud demo project in the
Studio in order to have access to the ready-to-use context connection parameters in the
Studio repository. If not, you can define them from scratch. For further information
about the demo project and context parameters, see the
Talend Studio Developer Guide
.

  • You have imported the Cloud demo project in the Studio.
  1. Open the Step Integration Action in the Studio.

  2. Click the Contexts tab below the design
    workspace.

    If the Contexts tab does not show in the
    Studio, click Window > Show
    view
    >
    Talend
    , and select Contexts.

    use_case-tactioninput_job2.png

  3. In the Contexts view:

    • Add a line in the table and define the context parameter for the
      filter following the pattern parameter__<parameter_name>, all in lower case. Enter
      parameter_gender for this
      example.

    • leave the Value field empty.

      This parameter enables you to use a condition in the tFilterRow component and filter customer data to
      output only rows with non-empty value.

Configuring the Components

  1. Double-click tActionInput to open the
    component basic settings view.
  2. Click Edit schema and define the schema
    columns: First_name, Last_name, Address, zip, City, Country and Gender.
  3. Set the data type in the Type column and
    click OK.
  4. Accept to propagate the schema to all other components in the Job when
    prompted.
  5. Double-click tFilterRow to open the component
    basic settings view.

    use_case-tactioninput_job3.png

  6. In the Conditions table, add a condition on
    the Gender column.
  7. In the Value field, press Ctrl + Space to get the
    list of available parameters and select
    context.parameter_gender
    .

    This condition filters customer data and output only rows with non-empty value
    in the Gender column.
    For further information about how to define context parameters, see Setting context parameters.

Setting metadata

  • The Integration Action is open in the Studio.

Click the Integration Action tab in the
design workspace and define the metadata for the Step Integration Action in the
Main view.

Adding metadata to Integration Actions helps web users to have more readable
Flows in the Cloud.
For further information about metadata, see the Talend Studio Developer
Guide
.

Configuring logs and exceptions

You can analyze or debug the execution of Integration Actions or Jobs and provide the
information at runtime either in Studio or in the web application.

For further information about the demo project, see Talend Studio Developer Guide.

  • The Integration Action is open in the Studio.

  • You have imported the Integration Cloud Demos
    project in the Studio.

Drop the ready-to-use exception handling subjob from the Joblets node in the Repository tree
view.

For further information about the usage of this subjob, see Configuring logs and exceptions.

Scenario 2: Uploading filtered data to Dropbox (deprecated)

This scenario applies only to a subscription-based Talend Platform solution or Big Data solution or Talend Data Fabric.

This scenario shows how to create a Target Integration Action which receives the customer
data filtered in the Step Integration Action outlined in Scenario 1: Filtering customer data (deprecated).

use_case-tactioninput_target.png

In this example:

  • The tDropboxConnection component opens a
    connection to Dropbox.

  • The tActionInput component receives the data flow
    from the Source Integration Action and transmits it to the Job.

  • The tFileOutputExcel component writes an output
    Excel file with the filtered customer data and passes it as a data flow to tDropboxPut.

  • The tDropboxPut component uploads the filtered
    data from a given data flow to Dropbox.

  • The exception handling subjob, jCloudLog, enables
    you to define log information, collect exception data and transfer it to the Studio
    console or to
    Talend Integration Cloud
    web application during
    execution. For further information, see Configuring logs and exceptions.

Prerequisites:

Setting up the Target Integration Action

  1. Drop the following components from the Palette into the design workspace: tDropboxConnection, tActionInput,
    tFileOutputExcel and tDropboxPut.
  2. Link tDropboxConnection
    to tActionInput using the OnComponentOk link, and link the other
    components in the Job using the Main
    links.

Setting context parameters

You must define the parameters to connect to Dropbox and the parameter for the path
to the customer file you want to process. Both parameters are defined as context
parameters in this example. First because connection parameters must be context
parameters, otherwise you may have a compile error when you try to publish the
Integration Action to the Cloud. And second because context parameters are parameters
you can pass to the Integration Action at runtime by using context variables which value
you can change according to your needs.

This example assumes that you have imported the Cloud demo project in the
Studio in order to have access to the ready-to-use context connection parameters in the
Studio repository. If not, you can define them from scratch. For further information
about the demo project and context parameters, see the
Talend Studio Developer Guide
.

  • You have imported the Cloud demo project in the Studio.
  1. Open the Target Integration Action in the Studio.

  2. Click the Contexts tab below the design
    workspace.

    If the Contexts tab does not show in the
    Studio, click Window > Show
    view
    >
    Talend
    , and select Contexts.

    use_case-tactioninput_target2.png

  3. In the Contexts view:

    To…

    Do the following…

    Import the context connection parameter

    • click the import_context_param_icon.png icon and import the Dropbox
      connection from the Studio repository.

    • in the Value field, set the
      token you have generated via the App console of Dropbox for accessing the
      Dropbox App folder to be used.

    Define the file-path parameter

    • Add a line in the table and define the context parameter
      for the file path following the pattern
      parameter__<file_path>, all in lower
      case. Enter parameter_upload_path for this
      example.

    • In the Value field, set the path
      to the filterd customer file on Dropbox.

Configuring the Components

  1. Double-click tDropboxConnection to open the
    component basic settings view.
  2. In the Access Token field, press Ctrl + Space to get the
    list of available parameters and select
    context.connection_dropbox_access_token
    .

    For further information about how to define/import context parameters, see
    Setting context parameters.
  3. Double-click tActionInput to open the
    component basic settings view.
  4. Click Edit schema and define the schema
    columns: First_name, Last_name, Address, zip, City, Country and Gender.
  5. Set the data type in the Type column and
    click OK.
  6. Accept to propagate the schema to all other components in the Job when
    prompted.
  7. Double-click tFileOutputExcel and set the
    following parameters in the component basic settings:

    • Select the Use Output Stream check
      box.

      In the File name/Stream field, press
      Ctrl+Space and from the global variable
      list select tDropboxPut_1.OUTPUTSTREAM to add the following value in the
      field ((java.io.OutputStream)globalMap.get(“tDropboxPut_1_OUTPUTSTREAM”)).

  8. Double-click tDropboxPut to open the
    component basic settings view.

    use_case-tactioninput_target3.png

  9. Select the Use Existing Connection check box
    and select from the list the tDropboxConnection
    component used in the Job.
  10. For the Upload Mode, select the Rename if Existing option.
  11. Select the Expose As OutputStream option to
    upload data to Dropbox as a data flow.

Setting metadata

  • The Integration Action is open in the Studio.

Click the Integration Action tab in the
design workspace and define the metadata for the Step Integration Action in the
Main view.

Adding metadata to Integration Actions helps web users to have more readable
Flows in the Cloud.
For further information about metadata, see the
Talend Studio Developer
Guide
.

Configuring logs and exceptions

You can analyze or debug the execution of Integration Actions or Jobs and
provide the information at runtime either in Studio or in the web application.

For further information about the demo project, see
Talend Studio
Developer Guide
.

  • The Integration Action is open in the Studio.
  • You have imported the Integration Cloud
    Demos
    project in the Studio.
Drop the ready-to-use exception handling subjob from the Joblets node in the Repository tree
view.

For further information about the usage of this subjob, see Configuring logs and exceptions.


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