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.
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:
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.
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:
To make it easy and reach our goal (quick), we create everything new.
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:
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: