Skip to main content Skip to complementary content
Close announcements banner

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.

Procedure

  1. Double-click the tFixedFlowInput component to open its Basic settings view.
  2. Click the 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:
    Peter;92
    James;93
    Thomas;91
    Peter;94
    James;96
    Thomas;95
    Peter;96
    James;92
    Thomas;98
    Peter;95
    James;96
    Thomas;93
    Peter;98
    James;97
    Thomas;95
  4. Double-click the tAggregateRow component to open its Basic settings view.
  5. Click the 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.
    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 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.
  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.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!