Important

This function is considered experimental and under active development and should not be used in production.

The function must be enabled using the feature flag ArrayFunctions. See Enabling/Disabling Features.

Computes a value from all events and array elements of the specified array.

ParameterTypeRequiredDefaultDescription
arraystringtrue The prefix of the array in Humio, for example for events with fields 'incidents[0], incidents[1], ...' this would be 'incidents'.
functionstringtrue The function to be applied to each element.
varstringtrue Array element field name to use in the function.

Syntactically, the function is similar to:

humio
split(array) | function(array)

but is more efficient.

Examples

Compute the maximum value of all values in an array named values in all events:

humio
array:reduceAll(values, var=x, function=max(x))

Group by array values and the non-array field type

humio
array:reduceAll(values, var=x, function=groupby([type, x]))