Search code examples
command-linesnowflake-cloud-data-platformsnowsql

In Snowsql, when I attempt to 'Put' a file I get the following error message:


"'put' is not recognized as an internal or external command, operable program or batch file."

I am inputting the following: "put file://C:\FolderName\FileName.csv"

All I need to do is upload a csv from my C drive to the Snowflake cloud. I figured this would be easy, but I can't for the life of me figure out why I keep getting this message.


Solution

  • First, you need to connect to SnowSQL from the command prompt and after that, you will be able to execute the PUT/GET command.

    C:> snowsql -a snowflake_accountname -u snowflake_username

    snowsql> use Database_name;

    snowsql> use schema SCHEMA_NAME;

    snowsql> use WAREHOUSE WAREHOUSE_NAME;

    snowsql> ls @My_Stage_NAME

    snowsql> put file://C:\FolderName\FileName.csv @My_Stage_NAME