Snowflake is a cloud-based data-warehouse solution. Snowflake works with all major cloud services provider like AWS, Azure, and Google cloud. Snowflake web interface provides a similar query environment as Oracle, and SQL Server to query the data.
- What is snowsql?
- Installation and configuration of snowsql.
- How to get the version of installed snowsql?
- Connecting with Snowflake using snowsql and querying the database.
- How to disconnect from SnowSQL?
- What is the latest version of SnowSQL?
- What is Snowflake architecture?
1. What is snowsql?
Snowflake is a cloud-based data warehouse solution and SnowSQL is a CLI tool used to interact with Snowflake. A CLI (command-line interface) tool is software that processes commands in the form of lines of text. The program which handles the interface is called a command-line interpreter.
SnowSQL is the command line client for connecting to Snowflake to execute SQL queries and perform all DDL and DML operations. Using SnowSQL we can load data or export data out of database tables.
2. Installation and configuration of snowsql.
Using SnowSQL, you can control all aspects of your Snowflake Data Cloud, including uploading data, querying data, changing data, and deleting data. This guide will review SnowSQL and use it to create a database, load data, and learn helpful commands to manage your tables and data directly from your CLI.
Please follow the official guideline to install Snowsql on Windows/Linux or Mac OS.
1. Installation on the windows
Download the MSI package from the below link and double click and follow the instruction by the installer.
2. Installation on Linux
- Download the rpm package from the below link and double click on it and follow the pop-up instruction.
https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/linux_x86_64/index.html - Use the curl command to download the package
- Use the below curl command to download the bash script installer
curl -O https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/linux_x86_64/snowsql-1.2.24-linux_x86_64.bash
- Open the terminal window, and run the bash script installer
bash snowsql-linux_x86_64.bash
- Use the below curl command to download the bash script installer
3. How to get the version of installed snowsql?
To get the installed version of snowsql use the below command
snowsql -v
4. Connecting with Snowflake using snowsql and querying the database.
There are multiple ways in which we can connect to Snowflake using snowsql.
-
-
By specifying the account name, user name, and password.
Connecting to the snowflake environment by specifying the account name, user, and password as a parameter
snowsql -a <account_identifier> -u <username> -d <database> -s <schema> -w<warehouse>
-
By using named connections in the snowsql configuration file.
Add the connection detail as below into the snowsql configuration file ~/.snowsql/config
[connections.conn_sf_sample_db]
accountname = <accountname>
username = <user_name>
password = <password>
dbname = SNOWFLAKE_SAMPLE_DATA
schemaname = TPCH_SF10
warehousename = COMPUTE_WHUse the below command to connect with the snowflake environment.
snowsql -c conn_sf_sample_db -
By using Key Pair Authentication.
To use the key pair authentication, we generate the private key & public key pair. Once the public key is generated we will assign the public key to the existing snowflake user.
I am working on a detailed article on this topic to use key pair authentication to connect with the snowflake environment.
-
5. How to disconnect from SnowSQL?
You can disconnect from the snowsql using the below command
- !quit
- !q
- Ctrl + D
6. What is the latest version of SnowSQL?
As of now (Dec 25, 2022) the latest version of snowsql is 1.2.24
for all the versions of snowsql please go to the official link https://developers.snowflake.com/snowsql/.
7. What is Snowflake architecture?
For detail related to snowflake architecture please visit our previous article on snowflake architecture.
Jump to the top of the page↵
Below are my previous articles
- Python obfuscation | Great technique to hide python code | Perfect use of pyarmor
- Datapane python reporting library for interactive reports and beautiful charts
- Jinja a template based python library for beautiful and interactive reports
- Python reporting libraries | Python reporting tools to generate interactive and beautiful reports
- pyspark dataframe | python spark dataframe with examples
- A to Z of Python exception handling | Python try catch with example
- File Handling Python With Examples | Python Input-Output Awesome Tips
- Modules in python tactics that can boost your python programming skills
- Python array | numpy for python | How to create numpy or np array in python
- Python Lambda Function With Examples | How To Create A New Anonymous function
- Python Useful Built-in Functions With Examples | How to create a new function
- python iteration | while loop | for loop with examples
- Python Data Types With Examples
- Python – installation indentation variable comments
- Python Programming Introduction
- Snowflake Architecture Deep Dive
- What is a Snowflake Data Warehouse?
- Types Of Supervised Learning Algorithms
- Artificial Intelligence An Introduction
- Part Of Speech Tagging Or POS Tagging
- An Introduction To Machine Learning
- Tokenization of Words and Sentences using NLTK
- Natural Language Processing An Introduction
- IoT An Introduction (Part 2)
- IoT An Introduction (Part 1)
- Lazy Evaluation in Apache Spark and its Advantage
- Calculating executor memory, number of Executors & Cores per executor for a Spark Application
- What is spark Executor?
- Deep Understanding of SparkContext & Application’s Driver Process
- Apache Spark Architecture
Somebody necessarily assist to make seriously posts
I might state. That is the very first time I frequented your web page and thus
far? I amazed with the analysis you made to create this particular publish
extraordinary. Magnificent activity!
Thank you.
Thanks for sharing your thoughts about snowflake setup.
Regards
Thank you.
I comment each time I especially enjoy a article on a site
or if I have something to valuable to contribute to the conversation.
Usually it’s triggered by the passion communicated in the article I looked at.
And after this article Setup Of Snowsql And Connecting Snowsql Using Command Line Interface | How To Connect To Snowflake
Using Snowsql – Mycloudplace. I was actually excited enough to
post a thought 😉 I actually do have a couple of questions for you if you do not mind.
Could it be simply me or do some of these comments
look like they are coming from brain dead visitors? 😛 And,
if you are posting on additional online sites, I would like to follow you.
Could you make a list all of your social sites like your Facebook page, twitter feed, or linkedin profile?
Saved as a favorite, I love yoyr site!
Hey,
Don’t pay thousands of dollars for a mobile app, we provide iOS and Android apps for your website at less than $200.
Visit our website awolfcreations.com and see some examples.
Kind Regards
awolfcreations.com Team
Have you ever considered about adding a little bit more than just your articles?
I mean, what you say is valuable and everything. Nevertheless imagine if you added some great graphics or
videos to give your posts more, “pop”! Your content is excellent but with images
and clips, this site could definitely be one of the best in its
field. Good blog!
Thanks for a marvelous posting! I genuinely enjoyed reading it, you can be a great author.
I will ensure that I bookmark your blog and definitely will come back
someday. I want to encourage that you continue your great posts,
have a nice evening!
Grat post. I wwas checking continuusly ths blogg andd I am impressed!
Extremely useful ingo spedcially the lastt art :
) I carre ffor succh inforkation much. I was seeking thks certain info for a ery long time.
Tank yyou and beset oof luck.
It’s awesome to pay a visit this web site and reading
the views of all friends on the topic of this piece of writing,
while I am also keen of getting knowledge.
I am regular reader, how are you everybody? This piece of writing posted at this site is in fact pleasant.
Everything is very open with a precise explanation of
the issues. It was definitely informative. Your site is very useful.
Many thanks for sharing!
Very nice article, totally what I was looking for.
Amazing! This blog looks exactly like my old one!
It’s on a totally different subject but it has pretty
much the same layout and design. Excellent choice of colors!