Loading a csv into Snowflake

Johan
3 min readJan 20, 2023

TL;DR: paste “#/get-started” after your Snowflake URL to find a new CSV import option

When you want to load a csv into Snowflake and you want to do it quick, it might not be that easy.

One option is to put the file on some cloud storage (AWS S3 for instance), you need to create a storage integration, a stage and a file format to get this up and running. Then, one of the options is to use the SnowSQL cli to PUT the file on the stage and do a COPY INTO in Snowflake.

This all is very useful when you are designing a Snowflake architecture where regular file loads happen. But it is not a quick one.

The second option: recently, I discovered a Streamlit app that can make it easier: Snowloader.

Snowloader

Pretty easy. One remark: a table needs to exist, although this interface basically recreated the table to match the structure of the csv. The table I created for this purpose only had one column, Snowloader created this table:

The table

This Snowloader app, very nice, and it is indeed pretty quick. Only need to create a table upfront.

Then, the third option, also one that I recently discovered when spinning up a Snowflake trial account. In this account, there was a “Get Started” option, one that I have never seen in any of my Snowflake accounts. Why is that ? Because it is very well hidden, I suppose.

Get Started

When we go to this page, one of the options showing up there is “Load Data Into Snowflake”.

Click the upload button, this is the interface snowing up”:

After uploading a file, some choices can be made:

Everything New

To make it easy and reach our goal (quick), we create everything new.

Mapping

Datatypes are suggested based on your data. Click Import and the magic will happen. Go run a query on the table and, voila:

Now, the million dollar question arises as this option seems to be really well hidden in Snowflake. Here is how to find it: in the browser address field, paste this text behind the account name:

/#/get-started

This leads to this Snowflake http link:

Manual editing of your Snowflake address

This way, you will get a whole new part of your Snowsight UI:

Summary: don’t try this in production. But, very handy for instance for quick demo purposes.

Links:

  1. Load CSV data from the local to Snowflake — ProjectPro
  2. https://snowloader.streamlit.app/

--

--

Johan

I am a freelance data engineer. My main focus is Snowflake, but I am always eager to learn new things. Python and AWS are my main side interests