Example - 6.5

Talend Job Script Reference Guide

author
Talend Documentation Team
EnrichVersion
6.5
EnrichProdName
Talend Big Data
Talend Big Data Platform
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
task
Design and Development > Designing Jobs
EnrichPlatform
Talend CommandLine
Talend Studio

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"
		}
	}