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

snowflake.snowpark.functions.as_integer

snowflake.snowpark.functions.as_integer(variant: ColumnOrName) 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