Skip to main content Skip to complementary content

ARRAY_DISTINCT

Returns all the distinct elements in the array.

Syntax

ARRAY_DISTINCT(input)

Arguments

Name Type Description Default Value
input any The values to transform

Returns

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.


Examples

input Output
array[1, 2, 3, 4, 4, 1] [1, 2, 3, 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!