Install SnowSQL, configure network settings, and connect to your Snowflake account from any Linux distribution.
Make sure you have a 64-bit Linux distro (Ubuntu, Debian, CentOS, or Amazon Linux), Python 3.8+, curl, and an outbound 443 port open. Create or locate a Snowflake user with the SYSADMIN role and generate a key-pair if you prefer key authentication.
Download the installer with: curl -O https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/installers/snowsql-linux_x86_64
. Mark it executable (chmod +x
) and run it.The script places snowsql
in /usr/bin
and creates ~/.snowsql/config
.
Run snowsql -a <account> -u <user>
. Accept the fingerprint prompt. If you see the SnowSQL >
prompt, the connection is live. Use \!exit
to leave.
Edit ~/.snowsql/config
and add accountname
, username
, rolename
, and warehouse
so that snowsql
reads them by default.Store sensitive data in ~/.snowsql/credentials
with 600 permissions.
After connecting, execute: CREATE DATABASE ecommerce; USE DATABASE ecommerce; CREATE SCHEMA sales;
Then create tables for Customers
, Orders
, Products
, and OrderItems
. Snowflake auto-scales storage, so no tablespace configuration is required.
Create an internal stage: CREATE OR REPLACE STAGE csv_stage;
Upload files with PUT file:///home/user/data/*.csv @csv_stage
.Copy into the target table: COPY INTO Customers FROM @csv_stage file_format = (type = csv skip_header = 1);
Start with CREATE WAREHOUSE dev_wh WITH WAREHOUSE_SIZE = XSMALL AUTO_SUSPEND = 60;
. Upgrade later with ALTER WAREHOUSE dev_wh SET WAREHOUSE_SIZE = MEDIUM;
when query latency grows.
Always set AUTO_SUSPEND
and MIN_CLUSTER_COUNT
to 1.Use AUTO_RESUME = TRUE
so Snowflake wakes up only when a query arrives.
Run snowsql -v
to see the version. Upgrade with snowsql -u
, or rerun the latest installer script. Configuration files remain intact.
Yes. Add snowsql -q "SQL"
steps to GitHub Actions or GitLab pipelines. Export credentials as environment variables (SNOWSQL_PWD
, SNOWSQL_PRIVATE_KEY_PASSPHRASE
) to avoid prompts.
.
Yes. On Ubuntu you can add Snowflake’s APT repo and run sudo apt-get install snowflake-snowsql
. The manual script works on any distro if a package manager is unavailable.
Export HTTPS_PROXY
and NO_PROXY
variables before invoking snowsql
. Proxy authentication must allow TLS tunneling to port 443.
Append authenticator=saml
in ~/.snowsql/config
. SnowSQL opens a browser window; copy the token back into the terminal when prompted.