Breaking Down the Process: How to Seamlessly Connect to Snowflake Using SnowCLI on Linux OS
OverView :-
In the rapidly evolving world of data storage and management, Snowflake stands out for its advanced capabilities and flexibility. To harness the full power of Snowflake, understanding and utilizing the SnowCLI (Command Line Interface) is essential. This comprehensive guide aims to streamline your SnowCLI journey, ensuring a seamless installation process and effortless connectivity to your Snowflake account.
1. Install SnowSQL in Linux
Already we have created a free trial account,(if you don’t have a trail account you can create it) and open the Snowflake UI to download SnowSQL installer.
Open your Web browser and search for Snowflake WebUI. Create an account if u don’t have.
In the Snowflake WebUI, click on ‘help’ and select ‘Download’ option.
You can get into Snowflake Repository to download the SnowSQL package. Otherwise, you can download the SnowSQL rpm
package from the below repository.
Right click on the latest SnowSQL CLI client link for Linux and click ‘Copy link address’.
- Open a command prompt or terminal window on your system and Use
wget
to download the SnowSQL CLI rpm file.
wget https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/linux_x86_64/snowflake-snowsql-1.2.21-1.x86_64.rpm
- Get into the root and Install the SnowSQL using the below command as
root
user.
rpm -i snowflake-snowsql-1.2.21–1.x86_64.rpm
- Once installed, verify the installation by checking the version of SnowSQL.
snowsql -v
- You can display the help section of SnowSQL client by running the following command:
snowsql
2. Connect Snowflake using SnowSQL in Linux
Use the below syntax to connect Snowflake from your Terminal window:
snowsql -a <account-name> -u <username>
You can get the account name from the URL which is unique for your account. The Account name consists of a unique account number and the Cloud region.
As you can see that here is my Snowflake web URL, account and username for Snowflake.
Web URL of Account: https://mahira123.ca-central-1.aws.snowflakecomputing.com/console#/internal/worksheet
Account name: an29203.ca-central-1.aws
User Name: admin
Connect the Snowflake using the following command.
snowsql -a mahira123.ca-central-1.aws -u admin
You will be asked to enter your account password.
Password:
* SnowSQL * v1.2.21
Type SQL statements or !help
admin #COMPUTE_WH@(no database).(no schema)>
Conclusion :-
There you have it! You’ve just taken your first steps into the wider world of Snowflake using SnowSQL CLI. This command-line interface is a powerful tool in your data arsenal, offering you flexibility, efficiency, and a deeper connection to your data workflows.
Whether you’re executing complex queries, managing databases, or simply prefer the tactility of the command line, SnowSQL CLI offers a direct pathway to Snowflake’s cloud data platform, no GUI needed. So, keep exploring, keep learning, and remember — the world of data is vast, and you’ve just unlocked another door.
Subscribe to my newsletter
Read articles from Mahira Technology Private Limited directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Mahira Technology Private Limited
Mahira Technology Private Limited
A leading tech consulting firm specializing in innovative solutions. Experts in cloud, DevOps, automation, data analytics & more. Trusted technology partner.