Skip to content

Arrays

These functions are used to parse and manipulate ARRAY inputs.

Functions

array_unique_string

Attribute Value
Name array_unique_string
ID bqtools.[region].array_unique_string
Description Performs a DISTINCT operation on STRING elements in an ARRAY
Type FUNCTION
Arguments input_array ARRAY<STRING>
Returns ARRAY<STRING>
Dependencies None

execution: array_unique_string

SELECT bqtools.eu.array_unique_string(input_array);
SELECT bqtools.us.array_unique_string(input_array);

array_remove_empty_elements

Attribute Value
Name array_remove_empty_elements
ID bqtools.[region].array_remove_empty_elements
Description Remove empty string elements in an ARRAY
Type FUNCTION
Arguments input_array ARRAY<STRING>
Returns ARRAY<STRING>
Dependencies None

execution: array_remove_empty_elements

SELECT bqtools.eu.array_remove_empty_elements(input_array);
SELECT bqtools.us.array_remove_empty_elements(input_array);

array_exclude_elements

Attribute Value
Name array_exclude_elements
ID bqtools.[region].array_exclude_elements
Description Filter through the input_array and returns a new ARRAY<STRING> with elements that are not in the exclude_array ARRAY.
Type FUNCTION
Arguments input_array ARRAY<STRING>, exclude_array ARRAY<STRING>
Returns ARRAY<STRING>
Dependencies None

execution: array_exclude_elements

SELECT bqtools.eu.array_exclude_elements(input_array, exclude_array);
SELECT bqtools.us.array_exclude_elements(input_array, exclude_array);