When unloading data to an external stage, which compression format can be used for Parquet files with the COPY INTO command?
When unloading data to an external stage, which compression format can be used for Parquet files with the COPY INTO command?
When unloading data to Parquet files using the COPY INTO command, the available compression formats are LZO, Snappy, or none. The default compression used is Snappy. GZIP is not a valid compression option for Parquet files.
LZO is for Parquet file and GZIP is for JSON file.
LZO and SNAPPY
None if the above. by default it should be Snappy. "When unloading data, files are compressed using the Snappy algorithm by default. You can optionally specify this value." https://docs.snowflake.com/en/sql-reference/sql/create-file-format#type-parquet:~:text=When%20unloading%20data%2C%20files%20are%20compressed%20using%20the%20Snappy%20algorithm%20by%20default.%20You%20can%20optionally%20specify%20this%20value.
TYPE = PARQUET COMPRESSION = AUTO | LZO | SNAPPY | NONE SNAPPY Files are compressed using the Snappy algorithm by default. You can optionally specify this value.
Parquet compression
C - LZO: https://docs.snowflake.com/en/sql-reference/sql/copy-into-location.html#type-parquet Options Default: Auto = Snappy LZO Snappy None Other options are:
if You try You will disvover that "By default, all unloaded data files are compressed using gzip" is false for parquet file type COPY INTO @SG_PROVA FROM GAME_LOGS FILE_FORMAT = ( TYPE = PARQUET); -- sg_prova/data_0_0_0.snappy.parquet COPY INTO @SG_PROVA/data2 FROM GAME_LOGS FILE_FORMAT = ( TYPE = PARQUET COMPRESSION = LZO); -- sg_prova/data2_0_0_0.lzo.parquet COPY INTO @SG_PROVA/data3 FROM GAME_LOGS FILE_FORMAT = ( TYPE = PARQUET COMPRESSION = GZIP); -- Invalid compression format GZIP
C - LZO
When unloading data, files are compressed using the Snappy algorithm by default. If unloading data to LZO-compressed files, specify this value. https://docs.snowflake.com/en/sql-reference/sql/create-file-format.html#type-parquet
LZO is for Parquet file and GZIP is for JSON file.
LZO is for Parquet file and GZIP is for JSON file.
C. LZO
Correct
LZO https://docs.snowflake.com/en/sql-reference/sql/copy-into-location#syntax
LZO https://docs.snowflake.com/en/sql-reference/sql/copy-into-location.html#format-type-options-formattypeoptions
https://docs.snowflake.com/en/user-guide/intro-summary-unloading.html Compression of Output Data Files The following table describes how Snowflake handles compression for the output files generated by Snowflake when unloading data: Location of Files Supported Notes Internal or external location gzip By default, all unloaded data files are compressed using gzip, unless compression is explicitly disabled or one of the other supported compression methods is explicitly specified. bzip2 Brotli Zstandard