Average function

Note: The Average function was introduced in CDAP 6.8.0.

Returns the average of each row in multiple columns.

Namespace

  • arithmetic

Input

Numeric values

Output

Double values

Syntax

set-column :column arithmetic:average(column1, column2, column3)

Example

Returns the average number of days to close a support ticket in jan, feb, mar and outputs the results to a new column avg_days_to_close:

set-column :avg_days_to_close arithmetic:average(jan, feb, mar)

Created in 2020 by Google Inc.