snowflake.snowpark.functions.any_value

snowflake.snowpark.functions.any_value(e: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/src/snowflake/snowpark/functions.py#L597-L608)

Returns a non-deterministic any value for the specified column. This is an aggregate and window function.

Example

>>> df = session.create_dataframe([[1, 2], [3, 4]], schema=["a", "b"])
>>> result = df.select(any_value("a")).collect()
>>> assert len(result) == 1  # non-deterministic value in result.
Copy
Language: English