Reputation: 13
In Snowflake what is difference between SF staged and SF table storage.
--Staged storage
put file://C:\Users\XXXX\Desktop\JC-202002-citibike-tripdata1.csv @%Trips2;
--Table storage
create table DEMO_DB.PUBLIC.Trips1 (tripduration integer, start_station_id integer, start_station_name string, start_station_latitude float, start_station_longitude float, end_station_id integer, end_station_name string, end_station_latitude float, end_station_longitude float, bikeid integer, usertype string, birth_year integer, gender integer);
Upvotes: 0
Views: 69
Reputation:
The internal table storage in Snowflake is structured, uses columnar storage formats, a form of partitioned layout, and more. You cannot directly access a table's underlying storage specifics, and the only way to add data into a table is by use of specific statements.
A stage, including the table-named internal stage, is roughly equivalent to a cloud storage bucket and path used to keep raw files for the purposes of eventually loading it into a table (or the opposite, to unload a table's rows into raw files for exports).
The PUT
statement in your description will help encrypt and upload local files into a cloud storage location used by your Snowflake account. You'll have to use the COPY INTO TABLE
statement to subsequently load it into the table your CREATE TABLE
statement has created, to query the data efficiently.
Upvotes: 1