Comment on page
ARRAY_DISTINCT
Get all the distinct elements in the array
ARRAY_DISTINCT(input)
Name | Type | Description | Default Value |
---|---|---|---|
input | any | The values to transform | |
an array of distinct values from the input. this function will maintain the order of the input. a primitive input will be considered an array with a single value and will return an array containing that value.
input | Output |
---|---|
array[1, 2, 3, 4, 4, 1] | [1, 2, 3, 4] |
CREATE JOB function_operator_example
ADD_MISSING_COLUMNS = true
AS INSERT INTO default_glue_catalog.upsolver_samples.orders_transformed_data MAP_COLUMNS_BY_NAME
SELECT input[],
ARRAY_DISTINCT(input[]) AS Output
FROM default_glue_catalog.upsolver_samples.orders_raw_data
LET input = array[1, 2, 3, 4, 4, 1]
WHERE time_filter()
LIMIT 1;
input[] | Output |
---|---|
array[1, 2, 3, 4, 4, 1] | [1, 2, 3, 4] |
Last modified 3mo ago