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

snowflake.snowpark.functions.is_real

snowflake.snowpark.functions.is_real(col: ColumnOrName) Column[source]

Returns true if the specified VARIANT column contains a floating-point value, fixed-point decimal, or integer.

Example:

>>> from snowflake.snowpark.functions import to_variant, is_real
>>> df = session.create_dataframe([[1.2, "X"]], schema=["a", "b"])
>>> df.select(is_real(to_variant("a")).as_("a"), is_real(to_variant("b")).as_("b")).collect()
[Row(A=True, B=False)]
Copy