snowflake.snowpark.functions.decompress_binary¶
- snowflake.snowpark.functions.decompress_binary(input_data: Union[snowflake.snowpark.column.Column, str], method: Union[snowflake.snowpark.column.Column, str]) Column[source]¶
Decompresses binary data using the specified compression method.
- Parameters:
input_data (ColumnOrName) – The binary data to decompress.
method (ColumnOrName) – The compression method used to decompress the data.
- Returns:
The decompressed binary data.
- Return type:
- Examples::
>>> from snowflake.snowpark.functions import lit >>> from snowflake.snowpark.functions import to_binary, lit >>> df = session.create_dataframe([['0920536E6F77666C616B65']], schema=["compressed_hex"]) >>> df.select(decompress_binary(to_binary(df["compressed_hex"]), lit("SNAPPY")).alias("decompressed")).collect() [Row(DECOMPRESSED=bytearray(b'Snowflake'))]