snowflake.snowpark.functions.hex_encode¶
- snowflake.snowpark.functions.hex_encode(e: Union[Column, str], case: int = 1)[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.29.1/snowpark-python/src/snowflake/snowpark/functions.py#L11409-L11421)¶
Encodes the input using hexadecimal (also ‘hex’ or ‘base16’) encoding.
Example
>>> df = session.create_dataframe(["Snowflake", "Hello"], schema=["input"]) >>> df.select(hex_encode(col("input")).alias("hex_encoded")).collect() [Row(HEX_ENCODED='536E6F77666C616B65'), Row(HEX_ENCODED='48656C6C6F')]