Snowflake SnowSql : A Command line Tour
By: Rajiv Gupta
Tags: Guides And Tutorials, Snowflake, Snowsql, Cli, Snow

SnowSQL is the command line tool for connecting to Snowflake. It is an interactive query tool to execute SQL queries and perform all DDL and DML operations, including loading data into and unloading data out of database tables in Snowflake.

Why we need SnowSql?

SnowSql is a modern command line tool designed for Snowflake Cloud data warehouse that is built on high security standards and has tight integration with Snowflake core architecture. It has very powerful scripting capability, and it can be further enhanced when used along with Python. Also, to upload/download any files to Snowflake internal stage you need SnowSql as put and get command work only with command line and not Web UI.

Is SnowSql Auto-Upgrade?

By default, SnowSQL upgrades itself automatically to the latest patch version. A new major or minor version requires a manual download and installation. When a newer patch version is available, SnowSQL downloads the new binary in a background process and executes the current version. The next time you run SnowSQL, the new version starts.

What is SnowSql Versioning?

In general, the following guidelines apply to the different version types:

Major version: A change in the major version indicates dramatic improvements in the underlying Snowflake service. A new major version breaks backward compatibility. You will need to download and install the latest SnowSQL version from the web interface.

Minor version: A change in the minor version indicates improvements to support forward compatibility in either SnowSQL or the underlying Snowflake service. A new minor version does not break backward compatibility, but we strongly recommend that you download and install the latest SnowSQL version from the web interface.

Patch version: A change in the patch version indicates small enhancements or bug fixes were applied. The auto-upgrade feature automatically installs all patch versions.

Auto Complete and Syntax Highlighting

With the context-sensitive auto-complete feature, SnowSql users are released of cumbersome and error-prone typing of long object names. Instead, they can complete SQL keywords and functions using the suggestions provided by the tool. Highlighting of the SQL statements in different colors provides better readability.

How to Specify Passwords When Connecting?

Passwords cannot be passed through connection parameters. Passwords must be specified in one of the following ways:

Entered via interactive prompt in SnowSQL (applies to passwords only). Details are mentioned in below video.

Defined in the SnowSQL configuration file using the password option. Details are mentioned in below video.

option. Details are mentioned in below video. Specified using the SNOWSQL_PWD environment variables.

Secure Connection and Encryption

SnowSQL secures connections to Snowflake using TLS (Transport Layer Security) with OCSP (Online Certificate Status Protocol) checks. The auto-upgrade binaries are always validated by using the RSA signature. In addition to secured connection, SnowSQL provides end-to-end security of data movement to and from Snowflake using AES (Advanced Encryption Standard) for Snowflake’s PUT and GET commands.

How to Install, Configure & Connect to Snowsql command line?

Below video will help you clarify from where you can download SnowSql, How to Configure & Connect via SnowSql.

Hope this blog help you to get insight on SnowSql. Feel free to ask a question in the comment section if you have any doubts regarding this. Give a clap if you like the blog. Stay connected to see many more such cool stuff. Thanks for your support.

Did you check my blog on below:

SNOWPRO Self Assessment Tool

Zero to Hero in Snowflake(SNOWPRO Certified in 2–3 weeks)

You Can Find me:

Follow me on Medium: https://rajivgupta780184.medium.com/

Follow me on Twitter: https://twitter.com/RAJIVGUPTA780

Connect with me in LinkedIn: https://www.linkedin.com/in/rajiv-gupta-618b0228/

Subscribe to my YouTube Channel: https://www.youtube.com/channel/UC8Fwkdf2d6-hnNvcrzovktg

#Keep learning #Keep Sharing #Everyday Learning.

References:-