DECOMPRESS_BINARY

functionsupportedCore SQL functions

docs.snowflake.com ↗

String & binary functions

Decompresses the compressed BINARY input parameter.

Syntax

DECOMPRESS_BINARY(<input>, <method>)

Parameters

NameRequiredDescription
inputrequiredA BINARY value (or expression) with data that was compressed using one of the compression methods specified in COMPRESS. If you attempt to decompress a compressed string, rather than a compressed BINARY value, you do not get an error; instead, the function returns a BINARY value. See the Usage Notes below for details.
methodrequiredThe compression method originally used to compress the input. See COMPRESS for a list of compression methods. The DECOMPRESS_BINARY method, unlike the COMPRESS method, does not require you to specify the compression level. If you do specify the compression level, DECOMPRESS_BINARY ignores it and uses the actual compression level.

Returns

A BINARY value with decompressed data.

Usage notes

See also

Referenced by