Install snowSQL on Windows

snowsql can be found here : SnowSQL – Snowflake Developers

You can either download latest version (recommended)

Or choose a particular version of choice:

  • Open the msi installer file

Open DOS or better still powershell prompt

Permission Warning on using SnowSQL

If you recieve a warning similar to below when running snowsql, we need to update log directory in the config file.

Failed to initialize log. No logging is enabled: [Errno 13] Permission denied: 'C:\\Users\\snowsql_rt.log_bootstrap'

Locate the snowsql config file: %USERPROFILE%\.snowsql\config

for me this was:

C:\Users\psammy\.snowsql\config

open file in notepad and edit To avoid a permission warning:

change
: log_file = ../snowsql_rt.log

to
:log_file = ./snowsql_rt.log

First time run snowsql it appears to perform some initial install actions.

Installing version: 1.2.20        [########----------------------------]   23%  
00:00:Installing version: 1.2.20  [########----------------------------]   24%  
00:00:Installing version: 1.2.20  [#########---------------------------]   25%  
..
..
00:00:Installing version: 1.2.20  [####################################]  100%

To connect we just need the below details

  • Account details without snowflake.com extension
    • %%nnn.<region>.<cloudprovider>
    • Example: ab12345.eu-west-2.aws
    • Username
    • Password

Then to connect we simply type:

If you have an account like: https://AB99999.eu-west-2.aws.snowflakecomputing.com
snowsql -a AB99999.eu-west-2.aws -u PSAMMY

or

If you have an account like: https://sgthsea-kf43267.snowflakecomputing.com
snowsql -a sgthsea-kf43267 -u PSAMMY

To quit snowsql type ‘!quit’ OR ‘cntrl + D’

we can also edit the same file as earlier to hardcode connection details: .snowsql\config so we can then simply type ‘snowsql’ to connect:

accountname = AB99999
region = eu-west-2.aws
username = PSAMMY
password = <type password>