August 15, 2023

Configuring the Job for aggregating and sorting data – Docs for ESB 6.x

Configuring the Job for aggregating and sorting data

Configure the Job to aggregate the students’ comprehensive scores
using the tAggregateRow component and then sort
the aggregated data using the tSortRow
component.

  1. Double-click the tFixedFlowInput
    component to open its Basic settings view.
  2. Click the

    components-button_three_dot.png

    button next to Edit schema to
    open the schema dialog box and define the schema by adding two columns, name of String type and score of Double type. When done, click OK to save the changes and close the schema dialog box.

  3. In the Mode area, select Use Inline Content (delimited file) and in the Content field displayed, enter the following input
    data:

  4. Double-click the tAggregateRow
    component to open its Basic settings view.

    Use_Case_tAggregateRow4.png

  5. Click the

    components-button_three_dot.png

    button next to Edit schema to
    open the schema dialog box and define the schema by adding five columns, name of String type, and sum, average, max, and min of
    Double type.

    Use_Case_tAggregateRow3.png

    When done, click OK to save the changes and close
    the schema dialog box.
  6. Add one row in the Group by table by
    clicking the

    plus_button.png

    button below it, and select name from both the Output column
    and Input column position column fields to group
    the input data by the name column.

  7. Add four rows in the Operations table
    and define the operations to be carried out. In this example, the operations are
    sum, average, max, and min. Then select score from all four Input column
    position
    column fields to aggregate the input data based on
    it.
  8. Double-click the tSortRow component to
    open its Basic settings view.

    Use_Case_tAggregateRow5.png

  9. Add one row in the Criteria table and
    specify the column based on which the sort operation is performed. In this example,
    it is the name column. Then select alpha from the sort num or
    alpha?
    column field and asc from
    the Order asc or desc? column field to sort the
    aggregated data in ascending alphabetical order.
  10. 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