snowflake.snowpark.functions.hex_decode_string

snowflake.snowpark.functions.hex_decode_string(input_expr: Union[snowflake.snowpark.column.Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.45.0/src/snowflake/snowpark/_functions/scalar_functions.py#L4719-L4737)

Decodes a hexadecimal-encoded string into its original string representation.

Parameters:

input_expr (ColumnOrName) – The column or string containing the hexadecimal-encoded string to decode.

Returns:

The decoded string.

Return type:

Column

Examples::
>>> from snowflake.snowpark.functions import col
>>> df = session.create_dataframe([["536E6F77666C616B65"], ["48454C4C4F"]], schema=["hex_string"])
>>> df.select(hex_decode_string(col("hex_string")).alias("decoded")).collect()
[Row(DECODED='Snowflake'), Row(DECODED='HELLO')]
Copy
Language: English