tAggregateRow example - Cloud - 8.0

Talend Job Script Reference Guide

Version
Cloud
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Cloud
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend CommandLine
Talend Studio
Content
Design and Development > Designing Jobs
Last publication date
2024-02-22

In the following example, the tAggregateRow component is configured to aggregate students' comprehensive scores based on the student names. The aggregation result will include the total score, average score, highest score, and lowest score of each student.

	setSettings {
		GROUPBYS {
			OUTPUT_COLUMN : "name",
			INPUT_COLUMN : "name"
		},
		OPERATIONS {
			OUTPUT_COLUMN : "sum",
			FUNCTION : "sum",
			INPUT_COLUMN : "score",
			OUTPUT_COLUMN : "average",
			FUNCTION : "avg",
			INPUT_COLUMN : "score",
			OUTPUT_COLUMN : "max",
			FUNCTION : "max",
			INPUT_COLUMN : "score",
			OUTPUT_COLUMN : "min",
			FUNCTION : "min",
			INPUT_COLUMN : "score"
		}
	}