Array Reduce Functions

AMPS includes a set of functions designed to operate over an array element in a message and produce a value. These functions take an array within a single message as input, and reduce that array to a single value as output.

FunctionParametersDescription

ARRAY_COUNT

array

Returns the number of elements in the array.

ARRAY_MAX

array

Returns the largest value in the array, using the standard AMPS > comparison.

ARRAY_MIN

array

Returns the minimum value in the array, using the standard AMPS < comparison.

ARRAY_SUM

array

Returns a number produced by adding all of the elements in the array.

NULL values in the array are ignored.

ARRAY_TO_STRING

array, delimiter, null_replacement

Returns a string comprised of the elements of the array, separated by the provided delimiter.

NULL values in the array are replaced with the provided null_replacement value.

Last updated

Copyright 2013-2024 60East Technologies, Inc.