snowflake.snowpark.functions.array_distinct¶
- snowflake.snowpark.functions.array_distinct(col: Union[Column, str])[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.47.0/src/snowflake/snowpark/functions.py#L4902-L4936)¶
The function excludes any duplicate elements that are present in the input ARRAY. The function is not guaranteed to return the elements in the ARRAY in a specific order. The function is NULL safe, which means that it treats NULLs as known values when identifying duplicate elements.
- Parameters:
col – The array column
- Returns:
Returns a new ARRAY that contains only the distinct elements from the input ARRAY.
Example: