0

After 4 days of trying everything to load data into snowflake, nothing seems to work at all. Now as my last option I want to load a local CSV file into snowflake in order to be able to follow the tutorial I am watching.

Unfortunately even this step seems to be a hard one in snowflake. I have seen, that I need to create an internal stage for this. Therefore I went to the Stage and created a "Snowflake Managed", which I think should be an internal stage. I called that Stage "MY_CSV_STAGE".

Internal Stage option on snowflake:
Internal Stage option on snowflake

Then I went back to the worksheet and tried the following command:

PUT file://C:\Users\User\Downloads\Projekte/csv_dateien_fuer_snowflake.csv @MY_CSV_STAGE AUTO_COMPRESS=TRUE;

Now by trying to run the command I am just receiving a weired error, which I don't understand:

Error Message:
Error Message

I really would like to understand what exactly I am doing wrong. I have also read on other places, that I should maybe need Snowsql to import data from local to snowflake. But the installation of the Snowsql I did not figure out.

How can I write this command line in snowflake in order to be able to import the CSV file?

Dharman
  • 30,962
  • 25
  • 85
  • 135
Siver R
  • 13
  • 7
  • 1
    "then i went back to the worksheet and tried the following command:" - ```PUT``` command as I understand was not supported in worksheet, it needs a tool like ```snowsql``` for that, unless behaviour was changed in latest worksheet version. Also why are you changing to '/' just before file name? – Pankaj Jul 15 '22 at 14:19
  • 1
    If your data set is <50mb, you can use the wizard in the Web UI to load data from a local CSV file directly: https://docs.snowflake.com/en/user-guide/data-load-web-ui.html – Jim Demitriou Jul 15 '22 at 14:49
  • Based on your screenshot you're doing a PUT via the Snowflake UI which is not supported. What OS are you using and why you couldn't install SnowSQL? What kind of issue did you had with it? – Sergiu Jul 15 '22 at 16:16
  • Hi @Pankaj, thank you very much for the information. Actually since i am completley new to this snowflake, i was not sure, if this command should be used in snowsql or in the worksheet. Now that you have mentioned it, i will definetly try to make the snowsql running. :) – Siver R Jul 16 '22 at 21:32
  • Hi @Sergiu, i am using windows 10 and regarding the snowsql, i have downloaded it from https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/index.html. However, after running the installer, nothing special happened and after i installed it, there is a programm called "snowsql". If i click on it a cmd window appears i see very quick some text and then it is closing automatically and nothing happens then. I have seen, that i need to do some steps for setting up the snowsql, which seems to be the following command: "snowsql -a -u .... – Siver R Jul 16 '22 at 21:41
  • I found out my account_name by running the command "SELECT CURRENT_ACCOUNT();" in the worksheet and tried the command "snowsql -a -u from the cmd. Of course i ran it in administrator modus and then it asked me for password. After entering my password from snowflake account, it is nothing happening for long and then i receive the error: "Failed to connect to DB. Verify the account name is correct" – Siver R Jul 16 '22 at 21:53
  • Hi @JimDemitriou, i have followed the step 1 inside your link, but unfortunatly there is neither "Load Data" nor the "Load Table" from point 4 of step 1. I am using a free trial for snowflake, which will end in 45 days. Are the functions for a free trial limited maybe? I also noticed very often during my tutorial learning, that my snowflake really is different to the one in the turorials. For example on the tutorial there is a button to import data from the database directly from local, but that button is not there for me. I have just checked my snowflake version and it is: 6.23.0...... – Siver R Jul 16 '22 at 23:08

0 Answers0