You are viewing documentation about an older version (1.15.0). View latest version

snowflake.snowpark.functions.as_integer¶

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

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         |
------------
Copy