0% found this document useful (0 votes)
33 views27 pages

Unit - V

The document discusses loading and unloading data from Snowflake. It covers using the PUT and COPY commands to load data from local files into Snowflake tables. It also covers using the COPY INTO and GET commands to unload data from Snowflake tables to local files.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views27 pages

Unit - V

The document discusses loading and unloading data from Snowflake. It covers using the PUT and COPY commands to load data from local files into Snowflake tables. It also covers using the COPY INTO and GET commands to unload data from Snowflake tables to local files.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

UNIT -V

Loading Data
Snowflake Object Hierarchy
Public Dataset
• download the Citi Bike NYC dataset.
• Data use policy can be found at
www.citibikenyc.com/datasharing-policy
Download the Dataset
• Go to the URL https://ride.citibikenyc.com/system-data
Loading Data into Snowflake via Web UI,

• Log In to Your Snowflake Account


• Create a Database
Create a Schema
• Create a Table
Drop and Recreate Objects
PUT and COPY Commands
• PUT Command supports uploading files from local
storage directly on a client machine to Snowflake's
Internal Stages, that is, Table, User, and Named
Stages.
• COPY is a SQL command, which is used to (bulk)
load data from file(s) into table(s) with parallelism
Loading Data via SnowSQL
• SnowSQL is a command-line interface (CLI) client
developed using the Snowflake Connector for
Python.
• Download SnowSQL
To download the executable, click “Help” and then
• select “Download” from the menu
• Install SnowSQL
• click it to open the installation wizard and
follow the instructions on the screen.
• Verify the installation by opening a command
prompt and typing snowsql.
Unloading Data
• Sample Dataset
• With every Snowflake account, there are
sample datasets for TPC-H and TPC-DS in
the SNOWFLAKE_SAMPLE_DATA database
Setting Up the Context
COPY INTO <location> and GET Commands,

• COPY INTO <location> is a SQL command, which is used to


(bulk) unload data from tables into file(s) with parallelism.

• The COPY INTO <location> SINGLE parameter helps to


specify whether the COPY command should unload data into
a single file or multiple files. The default value for SINGLE
is false.

• The Snowflake GET command supports downloading files


from Snowflake's Internal Stages, that is, Table, User, and
Named Stages, to local file systems on a client machine
Unloading Data
• unload data from the CUSTOMER table in the TPCH_SF10
schema in the SNOWFLAKE_SAMPLE_DATA database.
Download Data via SnowSQL
• Log In and Set Context

List Files from Internal Stage

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy