नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
Applies to:
Databricks SQL
Databricks Runtime 15.2 and above
Returns value compressed with Zstandard compression.
Syntax
zstd_compress ( value [, level [, streaming_mode ] ] )
Arguments
value: The binary value to compress.level: Optional integer argument between 1 and 22 that represents the compression level. The default is 3.streaming_mode: Optional boolean argument that indicates whether to use streaming mode.
Returns
Compressed value of type BINARY.
Examples
> SELECT base64(zstd_compress(repeat("Apache Spark ", 10)));
KLUv/SCCpQAAaEFwYWNoZSBTcGFyayABABLS+QU=
> SELECT string(zstd_decompress(zstd_compress("Apache Spark")));
Apache Spark
-- Using streaming mode
> SELECT base64(zstd_compress(repeat("Apache Spark ", 10), 3, true));
KLUv/QBYpAAAaEFwYWNoZSBTcGFyayABABLS+QUBAAA=