Connect, query, and manage Snowflake running on AWS from PostgreSQL-style SQL tools.
Snowflake on AWS is the cloud-hosted data warehouse deployed in Amazon Web Services regions. It stores data in S3 and provides scalable compute clusters called warehouses.
Use the SnowSQL CLI, JDBC/ODBC drivers, or a PostgreSQL-compatible editor like Galaxy. Supply account, region, user, role, warehouse, database, and schema.
snowsql -a myco.us-east-1 -u alice -r ANALYST_ROLE \
-w BI_WH -d ecommerce -s public
1) USE the correct context. 2) CREATE or SELECT objects. 3) COPY data from S3. 4) ANALYZE with familiar SQL. Snowflake auto-scales compute and separates storage.
CREATE SCHEMA IF NOT EXISTS ecommerce;
USE SCHEMA ecommerce;
CREATE TABLE Customers (
id INT,
name STRING,
email STRING,
created_at TIMESTAMP
);
-- Repeat for Orders, Products, OrderItems
CREATE OR REPLACE STAGE s3_stage
URL='s3://my-bucket/orders/'
CREDENTIALS=(AWS_KEY_ID='$AWS_KEY' AWS_SECRET_KEY='$AWS_SECRET');
COPY INTO Orders
FROM @s3_stage/orders_2023.csv
FILE_FORMAT=(TYPE=CSV FIELD_DELIMITER=',' SKIP_HEADER=1);
SELECT o.id AS order_id,
c.name AS customer,
SUM(oi.quantity * p.price) AS total
FROM Orders o
JOIN Customers c ON c.id = o.customer_id
JOIN OrderItems oi ON oi.order_id = o.id
JOIN Products p ON p.id = oi.product_id
GROUP BY o.id, c.name
ORDER BY total DESC;
Keep warehouses small and auto-suspend to cut costs. Use clustering keys on large fact tables. Leverage Snowflake Time-Travel and Fail-Safe for backups.
1) Forgetting to set USE
context: leads to "Object does not exist" errors. Always run USE ROLE
, USE WAREHOUSE
, USE DATABASE
, and USE SCHEMA
up front.
2) Oversizing warehouses: burning credits while idle. Enable AUTO_SUSPEND
and choose the smallest size that meets SLAs.
Yes. Use CREATE EXTERNAL TABLE
on an external stage pointing to S3, then query it like any table.
Snowflake ensures ACID transactions even on AWS object storage, making multi-statement workloads reliable.
Storage is charged per terabyte per month. Compute is charged per second of warehouse usage, rounded to the nearest minute.
Yes. Many editors that speak JDBC/ODBC, including Galaxy, connect seamlessly using the Snowflake driver.
Store keys in AWS Secrets Manager and reference them via external stages or environment variables.
Snowflake operates in most AWS regions. Select the region closest to your users to reduce latency.