LinuxCommandLibrary

snowsql

SnowSQL command-line client for Snowflake's Data Cloud.

TLDR

Connect to a specific instance at (password can be provided in prompt or configuration file)

$ snowsql --accountname [account] --username [username] --dbname [database] --schemaname [schema]
copy


Connect to an instance specified by a specific configuration file (defaults to ~/.snowsql/config)
$ snowsql --config [path/to/configuration_file]
copy


Connect to the default instance using a token for multi-factor authentication
$ snowsql --mfa-passcode [token]
copy


Execute a single SQL query or SnowSQL command on the default connection (useful in shell scripts)
$ snowsql --query '[query]'
copy


Execute commands from a specific file on the default connection
$ snowsql --filename [path/to/file.sql]
copy

Copied to clipboard