Calculating the average - 6.4

Global variable

author
Talend Documentation Team
EnrichVersion
6.4
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 Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
task
Data Governance > Third-party systems > Custom code components (Integration) > Global variable components
Data Quality and Preparation > Third-party systems > Custom code components (Integration) > Global variable components
Design and Development > Third-party systems > Custom code components (Integration) > Global variable components
EnrichPlatform
Talend Studio

Procedure

  1. Double-click tAggregateRow to open its Component view.
  2. Click the [...] button next to Edit schema to open the schema editor.
  3. In the table of the tAggregateRow schema, click the [+] button once to add one row and in the Column column, rename it to avg.
  4. In the Type column of the salary row, select Double.
  5. Click OK to validate these changes and accept the propagation prompted by the pop-up dialog box.
  6. Under the Operations table, click the [+] button to add one row and configure the following columns of this row to define the calculation of the average salary.

    Column

    Description

    Output column

    Select the column of the output schema in which the average salary is stored. In this scenario, it is avg.

    Function

    Select the avg function to calculate the average.

    Input column position

    Select the column of the input schema used to provide the source data of the calculation.