Skip to content

Dr. Praveen Borra

  • About
  • Expertise
  • Work
  • Research
  • Media
  • Blog
  • Contact
April 27, 2021

·

1–2 minutes

Data Unloading from Snowflake

By Dr. Praveen Borra

Bulk Unloading Process:

The process for unloading data into files is the same as the loading process, except in reverse:

Step 1

Use the COPY INTO <location> command to copy the data from the Snowflake database table into one or more files in a Snowflake or external stage.

Step 2

Download the file from the stage: •From a Snowflake stage, use the GET command to download the data file(s). •From S3, use the interfaces/tools provided by Amazon S3 to get the data file(s). •From Azure, use the interfaces/tools provided by Microsoft Azure to get the data file(s).

Bulk Unloading Using Queries:

Snowflake supports specifying a SELECT statement instead of a table in the COPY INTO <location> command. The results of the query are written to one or more files as specified in the command and the file(s) are stored in the specified location (internal or external).

Snowflake supports specifying a SELECT statement instead of a table in the COPY INTO <location> command. The results of the query are written to one or more files as specified in the command and the file(s) are stored in the specified location (internal or external).


Bulk Unloading into Single or Multiple Files:

The COPY INTO command provides a copy option(SINGLE) for unloading data into a single file or multiple files. The default is SINGLE = FALSE (i.e. unload into multiple files).

Snowflake assigns each file a unique name. The location path specified for the command can contain a filename prefix that is assigned to all the data files generated. If a prefix is not specified, Snowflake prefixes the generated filenames with data_.


Snowflake appends a suffix that ensures each file name is unique across parallel execution threads; e.g. data_stats_0_1_0.


When unloading data into multiple files, use the MAX_FILE_SIZE
copy option to specify the maximum size of each file created.


Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
Like Loading…

Dr. Praveen Borra

Principal Data & AI Architect for Microsoft Fabric and Azure, with a Ph.D. in Computer Science from Florida Atlantic University. I write about cloud, data and AI.

About me · Services · Get in touch

Leave a Reply Cancel reply

Keep reading

Latest articles

  • July 5, 2024

    Edge Computing: Applications Across Industries and Future Innovations

    Introduction In today’s digital landscape, where data generation and consumption are at an all-time high, traditional methods of data processing face significant…

  • July 13, 2022

    Azure SQL Edge

    What is Azure SQL Edge? Azure SQL Edge is an optimized relational database engine geared for IoT and IoT Edge deployments. It…

  • July 13, 2022

    Microsoft Purview

    What’s available in the Microsoft Purview governance portal? Microsoft Purview’s solutions in the governance portal provide a unified data governance service that…

All articles →

Dr. Praveen Borra

Enterprise data and AI leader on Microsoft Fabric and Azure. Ph.D. in Computer Science, Florida Atlantic University.

Dallas, Texas

Get in touch →

Explore

About

Services

Work

Research

Teaching

Media

Blog

Connect

Contact

LinkedIn

YouTube

Google Scholar

All profiles

© 2026 Dr. Praveen Borra

Views expressed on this site are my own.

  • Comment
  • Reblog
  • Subscribe Subscribed
    Dr. Praveen Borra

    Have a WordPress.com account? Log in now.

  • Dr. Praveen Borra
    Copy shortlinkView post in Reader
    Manage subscriptionsSign upLog in
    Report this content
    Collapse this bar
%d