August 15, 2023

tActionOutput (deprecated) – Docs for ESB 6.x

tActionOutput (deprecated)

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

This component is placed at the end of the Job to transmit data for
further processing.

For further information about Integration Actions, see Talend Studio Developer Guide.

tActionOutput Standard properties

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

The Standard
tActionOutput 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 to design Integration. These
Integration Actions can then be published to the web application and
used to design Flows in the Cloud.

Scenario: Receiving data from an input flow and transmitting it for further
processing (deprecated)

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

This scenario shows how to create a Source Integration Action which reads data from
Dropbox and uses the tActionOutput component to transmit
this data for further processing.

use_case-tactionoutput_job.png

In this example:

  • The tDropboxConnection component opens a
    connection to Dropbox.

  • The tDropboxGet component downloads the input
    data as a flow.

  • The tFlowToIterate component reads data line by
    line from the input flow and stores the data entries in global variables.

  • The tFileInputExcel component reads data from the
    input flow which has been added in the auto-completion list (Ctrl+Space).

  • The tActionOutput component transmits data to the
    next step for further processing.

  • 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 Source Integration Action

  1. Drop the following components from the Palette into the design workspace: tDropboxConnection, tDropboxGet,
    tFlowToIterate, tFileInputExcel and tActionOutput.
  2. Link tDropboxConnection to tDropboxGet using the OnComponentOk link, tDropboxGet to
    tFlowToIterate using the Main link, tFlowToIterate to
    tFileInputExcel using the Iterate link and tFileInputExcel to
    tActionOutput using the Main 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 Source 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-tactionoutput_job4.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_download_path for this example.

    • in the Value field, set the path to the
      customer file in Dropbox.

Configuring the Components

The input file in Dropbox contains some information about customers:

use_case-tactionoutput_inputfile.png

  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 tDropboxGet to open the
    component basic settings view.

    use_case-tactionoutput_job2.png

  4. Select the Use Existing Connection check box
    and select the tDropboxConnection component
    used in the Job from the list.
  5. In the Path field, press Ctrl + Space to get the
    list of available parameters and select
    context.parameter_download_path
    .

    For further information about how to define/import context parameters, see
    Setting context parameters.
  6. Click Edit schema and define two schema
    columns: fileName and content. Set the type of the content column to Object.
  7. Double-click tFlowToIterate to open the
    component basic settings view and select the Use the
    default (key, value) in global variables
    check box.

    The system uses the default value of the global variable in the current
    Integration Action.
  8. Double-click the first tJobLog component
    and set the following parameters in the component basic settings:
  9. Double-click tFileInputExcel and set the
    following parameters in the component basic settings:

    • In the File name/Stream field, press
      Ctrl+Space and from the global variable
      list select tFlowToIterate_1.content
      to add the following value in the field ((Object)globalMap.get(“row1.content”)).

    • Add one column in theSheet list table
      and define the sheet you want to process.

    • Set 1 in the First column to process the first sheet.

    • Create the schema through the Edit
      Schema
      button and set the data type in the Type column.

      use_case-tactionoutput_job3.png

      Accept to propagate the changes when prompted. This passes the schema
      you define to the next component in the Job, namely tActionOutput.

Setting metadata for the Source Integration Action

You can add metadata and/or an icon of your choice to Integration Actions in the
Studio to have more readable Flows when you publish the Integration Action to the
Cloud.

  • The Integration Action is open in the
    Studio.
Click the Integration Action tab in the
design workspace and define the metadata for the Source Integration Action in
the Main view.

If the Integration Action tab does not show
in the Studio, click Window > Show view >
Talend
, and select
Integration Action.
use_case-tactionoutput_job5.png

For further information about metadata, see the
Talend Integration Cloud Studio Developer Guide
.

Configuring logs and exceptions

When building Integration Actions or Jobs in the Studio, you can use the
tJobLog, tJobFailure and tLogCatcher
components to define log information, collect exception data and transfer it to the
Studio console or to
Talend Integration Cloud
web application during execution.

This helps you
to analyze and debug the execution of Integration Action, Jobs or Flows.
  • The Log4j option is enabled in the project settings. For further information,
    see
    Talend Studio for Cloud Developer
    Guide
    .
  1. .Open the Integration Action you already defined and drop the
    following components from the Palette into
    the design workspace: tLogCatcher,
    tJobLog (x2) and tJobFailure.

    use_case-tactionoutput_joblet.png

    If you have imported the Integration
    Cloud Demos
    project, you can drop a ready-to-use exception
    handling subjob from the Joblets node in
    the Repository tree view. For further
    information about the demo project, see
    Talend Studio for Cloud Developer
    Guide
    .
  2. Link the components together using the Main links.
  3. Double-click tLogCatcher component and select the
    Catch Java Exception check box in the component
    basic settings.

    If you use the Joblet from the demo project, this option is selected by
    default
  4. Double-click the first tJobLog component and
    set the following parameters in the component basic settings:

    • Select the Developer option and set the
      java expression of the log message in the Log
      message
      field, for example:

      "Component: " + row1.origin + "
      | Error type: " + row1.type + "

      | Error code: " + row1.code + "
      | Error message: " +
      row1.message
      .

      This logs the error messages to the Studio.

    • Select the error type from the Priority
      list.

  5. Double-click the second tJobLog component and
    set the following parameters in the component basic settings:

    • Select the User option and set the java
      expression of the log message in the Log
      message
      field, for example:

      row2.message.

      This logs the error messages to the web application.

    • Select the error type from the Priority
      list.

  6. Double-click tJobFailure and set the following
    parameters in the component basic settings:

    • Set Execution failed as the error type in the
      Error Type field.

      You can define the error type according to your needs and the value you
      define in this field will show in the run detail page when you run a Flow in
      the Could web application.

    • Set the java expression of the message in the Error
      Message
      field, for example as the following:

      row3.job + ":" + row3.origin +": " + row3.message

      You can define the error message according to your needs.

    For further information about handling logs and exceptions in the
    Studio, see
    Talend Studio for Cloud Developer Guide
    .

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