array_length

array_length(array: array) -> int64

returns the number of elements in an array, or null if input is not an array

Domain

This is a scalar function (calculates a single output value for a single input row).

Categories

Examples

make_col elements:split(proxy_upstream_name, "-")
make_col elementsLength:array_length(elements)

This produces an elementsLength column with the number of elements in each array produced by splitting a column named proxy_upstream_name on the "-" character. A proxy_upstream_name of "upstream-default-backend" produces an elementsLength of "3".