Summary of Data Unloading Features

This topic provides a quick-reference of the supported features for using the COPY INTO <location> command to unload data from Snowflake tables into flat files.

Note that some of the supported features, particularly compression and encryption, are dictated by whether you are unloading to a Snowflake internal location or an external location (Amazon S3, Google Cloud Storage, or Microsoft Azure).

Output Data File Details

The following table describes the general details for the output files generated by Snowflake when unloading data:

Feature

Supported

Notes

Location of files

Local files

Files are first unloaded to a Snowflake internal location, then can be downloaded locally using GET.

Files in Amazon S3

Files can be unloaded directly to any user-supplied bucket in S3, then can be downloaded locally using AWS utilities.

Files in Google Cloud Storage

Files can be unloaded directly to any user-supplied container in Cloud Storage, then can be downloaded locally using Cloud Storage utilities.

Files in Microsoft Azure

Files can be unloaded directly to any user-supplied container in Azure, then can be downloaded locally using Azure utilities.

File formats

Delimited files (CSV, TSV, etc.)

Any valid delimiter is supported; default is comma (i.e. CSV).

JSON

Parquet

File encoding

UTF-8

Output files are always encoded using UTF-8, regardless of the file format; no other character sets are supported.

Note

Unloads running on machines with memory pressure may result in files of smaller size.

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

Note

It is a known issue that we currently do not support setting CONTENT-ENCODING for Azure and Google Cloud Platform when compression=gzip.

Encryption of Output Data Files

The following table describes how Snowflake handles encryption for the output files generated by Snowflake when unloading data. The options are different depending on whether the files are unloaded to an internal location (i.e. Snowflake stage) or external location (Amazon S3, Google Cloud Storage, or Microsoft Azure):

Location of Files

Supported

Notes

Internal location

128-bit or 256-bit keys

All data files unloaded to Snowflake internal locations are automatically encrypted using 128-bit keys. The files are unencrypted when they are downloaded to the local directory.

256-bit keys can be enabled (for stronger encryption); however, additional configuration is required.

External location

User-supplied key

Data files unloaded to cloud storage can be encrypted if a security key (for encrypting the files) is provided to Snowflake.

Language: English