Configure the Job to aggregate the students' comprehensive scores
using the tAggregateRow component and then sort
the aggregated data using the tSortRow
component.
Procedure
- Double-click the tFixedFlowInput component to open its Basic settings view.
-
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.
-
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
-
Double-click the tAggregateRow
component to open its Basic settings view.
-
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. -
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.
- 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.
-
Double-click the tSortRow component to
open its Basic settings view.
- 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.
- 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.