Array Functions

This section provides reference information for the array functions in PlaidCloud Lakehouse.


ALL_MATCH

Learn how to use the ALL_MATCH array function in PlaidCloud Lakehouse. Returns TRUE if all elements in an array match the given predicate.

ANY_MATCH

Learn how to use the ANY_MATCH array function in PlaidCloud Lakehouse. Returns TRUE if any element in an array matches the given predicate.

ARRAY_AGG

Learn how to use the ARRAY_AGG array function in PlaidCloud Lakehouse. Aggregates values into an array - see syntax, examples, and output.

ARRAY_APPEND

Learn how to use the ARRAY_APPEND array function in PlaidCloud Lakehouse. Appends an element to the end of an array - see syntax, examples, and output.

ARRAY_AVG

Learn how to use the ARRAY_AVG array function in PlaidCloud Lakehouse. Returns the average of elements in an array - see syntax, examples, and output.

ARRAY_CONCAT

Learn how to use the ARRAY_CONCAT array function in PlaidCloud Lakehouse. Concatenates multiple arrays into a single array - with syntax and examples.

ARRAY_CONTAINS

Learn how to use the ARRAY_CONTAINS array function in PlaidCloud Lakehouse. Checks whether an array contains a specific element - with syntax and examples.

ARRAY_CONTAINS_ALL

Learn how to use the ARRAY_CONTAINS_ALL array function in PlaidCloud Lakehouse. Checks whether an array contains all elements of another array.

ARRAY_CONTAINS_SEQ

Learn how to use the ARRAY_CONTAINS_SEQ array function in PlaidCloud Lakehouse. Checks whether an array contains all elements of another array in order.

ARRAY_CUM_SUM

Learn how to use the ARRAY_CUM_SUM array function in PlaidCloud Lakehouse. Returns the cumulative sum of elements in an array - with syntax and examples.

ARRAY_DIFFERENCE

Learn how to use the ARRAY_DIFFERENCE array function in PlaidCloud Lakehouse. Returns an array of differences between consecutive elements.

ARRAY_DISTINCT

Learn how to use the ARRAY_DISTINCT array function in PlaidCloud Lakehouse. Removes duplicate elements from an array - see syntax, examples, and output.

ARRAY_FILTER

Learn how to use the ARRAY_FILTER array function in PlaidCloud Lakehouse. Filters elements in an array using a lambda expression - with syntax and examples.

ARRAY_FLATTEN

Learn how to use the ARRAY_FLATTEN array function in PlaidCloud Lakehouse. Flattens nested arrays into a single-level array - with syntax and examples.

ARRAY_GENERATE

Learn how to use the ARRAY_GENERATE array function in PlaidCloud Lakehouse. Generates an array of sequential values - see syntax, examples, and output.

ARRAY_INTERSECT

Learn how to use the ARRAY_INTERSECT array function in PlaidCloud Lakehouse. Returns the intersection of two arrays - see syntax, examples, and output.

ARRAY_JOIN

Learn how to use the ARRAY_JOIN array function in PlaidCloud Lakehouse. Concatenates array elements into a string with a separator - with syntax and examples.

ARRAY_LENGTH

Learn how to use the ARRAY_LENGTH array function in PlaidCloud Lakehouse. Returns the number of elements in an array - see syntax, examples, and output.

ARRAY_MAP

Learn how to use the ARRAY_MAP array function in PlaidCloud Lakehouse. Applies a lambda expression to each element of an array - with syntax and examples.

ARRAY_MAX

Learn how to use the ARRAY_MAX array function in PlaidCloud Lakehouse. Returns the maximum element in an array - see syntax, examples, and output.

ARRAY_MIN

Learn how to use the ARRAY_MIN array function in PlaidCloud Lakehouse. Returns the minimum element in an array - see syntax, examples, and output.

ARRAY_POSITION

Learn how to use the ARRAY_POSITION array function in PlaidCloud Lakehouse. Returns the position of the first occurrence of an element (1-indexed).

ARRAY_REMOVE

Learn how to use the ARRAY_REMOVE array function in PlaidCloud Lakehouse. Removes all occurrences of a specified element from an array.

ARRAY_REPEAT

Learn how to use the ARRAY_REPEAT array function in PlaidCloud Lakehouse. Creates an array containing a specified element repeated N times.

ARRAY_SLICE

Learn how to use the ARRAY_SLICE array function in PlaidCloud Lakehouse. Returns a slice of an array from a start position with a given length.

ARRAY_SORT

Learn how to use the ARRAY_SORT array function in PlaidCloud Lakehouse. Sorts the elements of an array in ascending order - with syntax and examples.

ARRAY_SORTBY

Learn how to use the ARRAY_SORTBY array function in PlaidCloud Lakehouse. Sorts elements of one array by corresponding elements of another array.

ARRAY_SUM

Learn how to use the ARRAY_SUM array function in PlaidCloud Lakehouse. Returns the sum of elements in an array - see syntax, examples, and output.

ARRAY_TO_BITMAP

Learn how to use the ARRAY_TO_BITMAP array function in PlaidCloud Lakehouse. Converts an array of integers to a bitmap - see syntax, examples, and output.

ARRAY_TOP_N

Learn how to use the ARRAY_TOP_N array function in PlaidCloud Lakehouse. Returns the top N elements from an array - see syntax, examples, and output.

ARRAY_UNIQUE_AGG

Learn how to use the ARRAY_UNIQUE_AGG array function in PlaidCloud Lakehouse. Aggregates values into an array of distinct values - with syntax and examples.

ARRAYS_OVERLAP

Learn how to use the ARRAYS_OVERLAP array function in PlaidCloud Lakehouse. Checks whether two arrays have any common elements - with syntax and examples.

ARRAYS_ZIP

Learn how to use the ARRAYS_ZIP array function in PlaidCloud Lakehouse. Merges multiple arrays into an array of structs - see syntax, examples, and output.

CARDINALITY

Learn how to use the CARDINALITY array function in PlaidCloud Lakehouse. Returns the number of elements in an array. Alias for ARRAY_LENGTH.

ELEMENT_AT

Learn how to use the ELEMENT_AT array function in PlaidCloud Lakehouse. Returns the element at a specified position in an array (1-indexed).

REVERSE

Learn how to use the REVERSE array function in PlaidCloud Lakehouse. Returns an array with elements in reverse order - see syntax, examples, and output.

UNNEST

Learn how to use the UNNEST array function in PlaidCloud Lakehouse. Expands an array into a set of rows - see syntax, examples, and output.