snowflake.snowpark.functions.try_to_binary¶
- snowflake.snowpark.functions.try_to_binary(e: Union[Column, str], fmt: Optional[str] = None) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.47.0/src/snowflake/snowpark/functions.py#L11951-L11971)¶
A special version of TO_BINARY that performs the same operation (i.e. converts an input expression to a binary value), but with error handling support (i.e. if the conversion cannot be performed, it returns a NULL value instead of raising an error).
Example: