snowsql CLI example config
macOS Snowsql CLI installation and setup in 3 easy steps:
Install brew
Install brew via one copy-paste from here
Install snowsql binary
brew cask install snowflake-snowsql
Configure snowsql
vi ~/.snowsql/config
follow example config file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# invoke below set of configuration via: | |
# $ snowsql -c training | |
[connections.training] | |
# https://sfeducationalservices3_acct45.snowflakecomputing.com/ | |
accountname = sfeducationalservices3_acct45 | |
username = woodchuck | |
password = *your*password*here | |
# invoke default configuration via: | |
# $ snowsql | |
[connections] | |
# https://company.region.snowflakecomputing.com/ | |
accountname = company.us-east-1 | |
username = joeblogs | |
password = *password*here | |
[variables] | |
#Loads these variables on startup | |
#Can be used in SnowSql as select $example_variable | |
example_variable=27 | |
[options] | |
# If set to false auto-completion will not occur interactive mode. | |
auto_completion = True | |
# main log file location. The file includes the log from SnowSQL main | |
# executable. | |
log_file = ~/.snowsql/log | |
# bootstrap log file location. The file includes the log from SnowSQL bootstrap | |
# executable. | |
# log_bootstrap_file = ~/.snowsql/log_bootstrap | |
# Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO" | |
# and "DEBUG". | |
log_level = CRITICAL | |
# Timing of sql statments and table rendering. | |
timing = True | |
# Table format. Possible values: psql, plain, simple, grid, fancy_grid, pipe, | |
# orgtbl, rst, mediawiki, html, latex, latex_booktabs, tsv. | |
# Recommended: psql, fancy_grid and grid. | |
output_format = psql | |
# Keybindings: Possible values: emacs, vi. | |
# Emacs mode: Ctrl-A is home, Ctrl-E is end. All emacs keybindings are available in the REPL. | |
# When Vi mode is enabled you can use modal editing features offered by Vi in the REPL. | |
key_bindings = emacs | |
# OCSP Fail Open Mode. | |
# The only OCSP scenario which will lead to connection failure would be OCSP response with a | |
# revoked status. Any other errors or in the OCSP module will not raise an error. | |
# ocsp_fail_open = True | |
# Repository Base URL | |
# The endpoint to download the SnowSQL main module. | |
repository_base_url = https://sfc-repo.snowflakecomputing.com/snowsql |
test and launch
$ snowsql # default set of configurations
$ snowsql -c training # training set of configurations