snowflake.snowpark.functions.as_integer¶
- snowflake.snowpark.functions.as_integer(variant: Union[Column, str]) Column [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/src/snowflake/snowpark/functions.py#L7516-L7531)¶
Casts a VARIANT value to an integer.
- Example::
>>> df = session.sql("select 1.2345::variant as a") >>> df.select(as_integer("a").alias("result")).show() ------------ |"RESULT" | ------------ |1 | ------------