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

snowflake.snowpark.functions.is_char

snowflake.snowpark.functions.is_char(col: Union[Column, str]) Column[source]

Returns true if the specified VARIANT column contains a string.

Examples:

>>> from snowflake.snowpark.types import StructField, VariantType
>>> df = session.create_dataframe([["abc", 123]], schema=["a", "b"])
>>> df.select(is_char(to_variant(df["a"])).alias("varchar"), is_char(to_variant(df["b"])).alias("int")).collect()
[Row(VARCHAR=True, INT=False)]
Copy