Downloads data files from one of the following Snowflake stages to a local directory/folder on a client machine:
Named internal stage.
Internal stage for a specified table.
Internal stage for the current user.
Typically, this command is executed after using the COPY INTO <location> command to unload data from a table into a Snowflake stage.
GET does not support downloading files from external stages. To download files from external stages, use the utilities provided by the cloud service.
The ODBC driver supports GET with Snowflake accounts hosted on the following platforms:
Amazon Web Services (using ODBC Driver Version 2.17.5 and higher).
Google Cloud Platform (using ODBC Driver Version 2.21.5 and higher).
Microsoft Azure (using ODBC Driver Version 2.20.2 and higher).
GET internalStage file://<path_to_file>/<filename> [ PARALLEL = <integer> ] [ PATTERN = '<regex_pattern>'' ]
internalStage ::= @[<namespace>.]<int_stage_name>[/<path>] | @[<namespace>.]%<table_name>[/<path>] | @~[/<path>]
Specifies the location in Snowflake from which to download the files:
Files are downloaded from the specified named internal stage.
Files are downloaded from the stage for the specified table.
Files are downloaded from the stage for the current user.
namespaceis the database and/or schema in which the named internal stage or table resides. It is optional if a database and schema are currently in use within the session; otherwise, it is required.
pathis an optional case-sensitive path for files in the cloud storage location (i.e. files have names that begin with a common string) that limits access to a set of files. Paths are alternatively called prefixes or folders by different cloud storage services. If
pathis specified, but no file is explicitly named in the path, all data files in the path are downloaded.
If the stage name or path includes spaces or special characters, it must be enclosed in single quotes (e.g.
'@"my stage"'for a stage named
Specifies the local directory and path on the client machine where the files are downloaded:
You must include the initial forward slash in the path (e.g.
If the directory path and/or filename includes special characters, the entire file URI must be enclosed in single quotes.
You must include the drive and backslash in the path (e.g.
If the directory path and/or filename includes special characters, the entire file URI must be enclosed in single quotes. Note that the drive and path separator is a forward slash (
/) in enclosed URIs (e.g.
'file://C:/temp/load data'for a path in Windows that includes a directory named
PARALLEL = integer
Specifies the number of threads to use for downloading the files. The granularity unit for downloading is one file.
Increasing the number of threads can improve performance when downloading large files.
Supported values: Any integer value from
1(no parallelism) to
99(use 99 threads for downloading files).
PATTERN = 'regex_pattern'
Specifies a regular expression pattern for filtering files to download. The command lists all files in the specified
pathand applies the regular expression pattern on each of the files found.
Default: No value (all files in the specified stage are downloaded)
The command cannot be executed from the Worksheets page in either Snowflake web interface; instead, use the SnowSQL client to download data files, or check the documentation for the specific Snowflake client to verify support for this command.
The command does not rename files.
Downloaded files are automatically decrypted using the same key that was used to encrypt the file when it was either uploaded (using PUT) or unloaded from a table (using COPY INTO <location>).
Download all files in the stage for the
mytable table to the
/tmp/data local directory (in a Linux or macOS environment):
GET @%mytable file:///tmp/data/;
Download files from the
myfiles path in the stage for the current user to the
/tmp/data local directory (in a Linux or
GET @~/myfiles file:///tmp/data/;