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

snowflake.snowpark.functions.strip_null_value

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

Converts a JSON “null” value in the specified column to a SQL NULL value. All other VARIANT values in the column are returned unchanged.

Example::
>>> df = session.create_dataframe(
...     ["null", "1"],
...     schema=["S"],
... ).select(strip_null_value(parse_json(col("S"))).as_("B")).where(
...     sql_expr("B is null")
... )
>>> df.collect()
[Row(B=None)]
Copy