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

snowflake.snowpark.functions.is_binary

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

Returns true if the specified VARIANT column contains a binary value.

Examples:

>>> from snowflake.snowpark.types import StructField, VariantType
>>> df = session.create_dataframe([[b"snow", "snow"]], schema=["a", "b"])
>>> df.select(is_binary(to_variant(df["a"])).alias("binary"), is_binary(to_variant(df["b"])).alias("varchar")).collect()
[Row(BINARY=True, VARCHAR=False)]
Copy