Wed. Nov 25th, 2020
Snowflake CLI

Before starting, i wanted to share for windows user how to install the SnowSQL :

INSTALL SnowSQL CLI

Download Links for windows , take latest one :

https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/windows_x86_64/index.html

to customize the usage , you can open file browser and paste this :

%USERPROFILE%\.snowsql\

Step 1 : start your command line ( cmd ) and type snowsql

Step 2 : connect to your snowflake account

  • Connect with login & password : type
    • snowsql -a XXX.eu-central-1
  • Connect through Okta ( SSO ) :
    • snowsql --authenticator https://logon.okta.com/ -a XXX.eu-central-1
  • Connect to specific Schema/DB/Warehouse through Okta :
    • snowsql --authenticator https://logon.okta.com/ -a XXXX.eu-central-1 -d DATABASE -s SCHEMA -w WAREHOUSE -r ROLE

RUN Snowflake SQL queries in command-line

  • snowsql --authenticator https://logon.okta.com/ -a XXXX.eu-central-1 -d DATABASE -s SCHEMA -w WAREHOUSE -r ROLE -f file.sql

Exit command line : ctrl +d

By Amine Hallam

Author & blogger on the latest data analytics technologies: Hadoop, Snowflake, Cloud ( AWS ), ETL .. etc

Leave a Reply

Your email address will not be published. Required fields are marked *