| name | snowflake-hello-world |
| description | Create a minimal working Snowflake example with real SQL queries.
Use when testing your Snowflake setup, running first queries,
or learning basic snowflake-sdk and snowflake-connector-python patterns.
Trigger with phrases like "snowflake hello world", "snowflake example",
"snowflake quick start", "first snowflake query".
|
| allowed-tools | Read, Write, Edit |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","data-warehouse","analytics","snowflake"] |
| compatibility | Designed for Claude Code |
Snowflake Hello World
Overview
Minimal working examples demonstrating core Snowflake operations: connect, query, create objects, load data.
Prerequisites
- Completed
snowflake-install-auth setup
- Valid credentials configured in environment
- A warehouse available (e.g.,
COMPUTE_WH)
Instructions
Step 1: Connect and Query (Node.js)
import snowflake from 'snowflake-sdk';
const connection = snowflake.createConnection({
account: process.env.SNOWFLAKE_ACCOUNT!,
username: process.env.SNOWFLAKE_USER!,
password: process.env.SNOWFLAKE_PASSWORD!,
warehouse: 'COMPUTE_WH',
database: 'DEMO_DB',
schema: 'PUBLIC',
});
connection.connect((err) => {
if (err) {
console.error('Connection failed:', err.message);
process.exit(1);
}
console.log('Connected to Snowflake!');
connection.execute({
sqlText: `SELECT CURRENT_TIMESTAMP() AS now,
CURRENT_WAREHOUSE() AS warehouse,
CURRENT_DATABASE() AS database,
CURRENT_ROLE() AS role`,
: {
(err) {
.(, err.);
;
}
.(, rows);
connection.( {
(err) .(, err.);
});
},
});
});