August 15, 2023

Configuring the Job for catching the message triggered by the tDie component – Docs for ESB 6.x

Configuring the Job for catching the message triggered by the tDie component

Configure the components used in the Job that catches the message
triggered by the tDie component and then displays
the message on the console.

  1. Double-click the tRowGenerator
    component to open its row generator editor.

    Use_Case_tDie2.png

  2. Define the schema by adding one column id of Integer type, and select the predefined function Numeric.sequence(String,int,int) in the Functions column.
  3. Enter the number of rows to be generated in the Number of Rows for RowGenerator field, 0 in this example. When done, click OK to close the dialog box.
  4. Double-click the tFileOutputDelimited
    component to open its Basic settings view, and in
    the File Name field, specify the path to the file
    that will hold the data to be generated.
  5. Click the If connection, and in the
    Condition field on the Basic settings view, specify the condition based on which the
    tDie component will be triggered. In this
    example, it is ((Integer)globalMap.get(“tRowGenerator_1_NB_LINE”)) <=0, which
    means the tDie component will be triggered when the
    number of rows to be generated is less than or equal to zero.
  6. Double-click the tDie component to
    open its Basic settings view, and in the Die message field, enter the message to be triggered
    before the Job is killed. In this example, it is no row
    generated
    .

    Use_Case_tDie3.png

  7. Double-click the tJava component to
    open its Basic settings view, and in the Code field, enter

    Note that this message will be displayed only when the number of rows generated is
    greater than zero. In this example, the number of rows to be generated is 0, so the Job will be killed and this message will not
    be displayed.
  8. Double-click the tLogCatcher component
    to open its Basic settings view and select the
    Catch tDie check box to catch the message
    triggered by the tDie component.

    Use_Case_tDie4.png

  9. Double-click the tLogRow component to
    open its Basic settings view, and then select
    Table (print values in cells of a table) in the
    Mode area for better readability of the
    result.

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