Array Functions
7 functions for array containment, sizing, sorting, and joining. The source column is always the implicit first input and must be an array type.
| Function | Syntax | Parameters | Notes |
|---|---|---|---|
array_contains | array_contains(column, value) | value — literal to search for. | Returns boolean. |
array_size | array_size(column) | None. | |
flatten_array | flatten_array(column) | None. | Flattens an array of arrays into a single array. |
array_sort | array_sort(column) | None. | |
array_distinct | array_distinct(column) | None. | |
array_join | array_join(column, delimiter, nullReplacement) | delimiter default ",". nullReplacement optional. | Concatenates array elements into a single string. |
array_zip | array_zip(column, otherColumn) | otherColumn — column ref, must also be an array. | Pairs elements of the two arrays positionally. |