snowflake.snowpark.functions.any_value¶

snowflake.snowpark.functions.any_value(e: Union[Column, str]) → Column[source]¶

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