snowflake.snowpark.functions.array_sort¶
- snowflake.snowpark.functions.array_sort(array: Union[Column, str], sort_ascending: Optional[bool] = True, nulls_first: Optional[bool] = False) Column [source] (https://github.com/snowflakedb/snowpark-python/blob/release-v1.7.0/src/snowflake/snowpark/functions.py#L3454-L3471)¶
Returns rows of array column in sorted order. Users can choose the sort order and decide where to keep null elements.
Must enable parameter ENABLE_ARRAY_SORT_FUNCTION in your session.
- Parameters:
array – name of the column or column element which describes the column
sort_ascending – Boolean that decides if array elements are sorted in ascending order. Defaults to True.
nulls_first – Boolean that decides if SQL null elements will be placed in the beginning of the array. Note that this does not affect JSON null. Defaults to False.