Skip to main content Skip to complementary content

COUNT_VALUES

Returns the number of non-null items in a given array.

Syntax

COUNT_VALUES(input)

Arguments

Name Type Description Default Value
input any The input array

Returns

The number of non-null items in the input array. If the input is a primitive value, 0 will be returned if null, and otherwise 1 1 will be returned.


Examples

input Output
null::string 0
array["a", "b", "c"] 3
array[1, 2, 3, 4] 4

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!