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

snowflake.snowpark.functions.is_object

snowflake.snowpark.functions.is_object(col: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L4650-L4662)

Returns true if the specified VARIANT column contains an OBJECT value.

Example:

>>> from snowflake.snowpark.functions import to_variant, is_object
>>> df = session.create_dataframe([[[1, 2], {"a": "snow"}]], schema=["a", "b"])
>>> df.select(is_object(to_variant("a")).as_("a"), is_object(to_variant("b")).as_("b")).collect()
[Row(A=False, B=True)]
Copy
Language: English