snowflake-hello-world
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".
What this skill does
# 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)
```typescript
// hello-snowflake.ts
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!');
// Run a simple query
connection.execute({
sqlText: `SELECT CURRENT_TIMESTAMP() AS now,
CURRENT_WAREHOUSE() AS warehouse,
CURRENT_DATABASE() AS database,
CURRENT_ROLE() AS role`,
complete: (err, stmt, rows) => {
if (err) {
console.error('Query failed:', err.message);
return;
}
console.log('Query result:', rows);
connection.destroy((err) => {
if (err) console.error('Disconnect error:', err.message);
});
},
});
});
```
### Step 2: Connect and Query (Python)
```python
# hello_snowflake.py
import snowflake.connector
import os
conn = snowflake.connector.connect(
account=os.environ['SNOWFLAKE_ACCOUNT'],
user=os.environ['SNOWFLAKE_USER'],
password=os.environ['SNOWFLAKE_PASSWORD'],
warehouse='COMPUTE_WH',
database='DEMO_DB',
schema='PUBLIC',
)
try:
cursor = conn.cursor()
cursor.execute("""
SELECT CURRENT_TIMESTAMP() AS now,
CURRENT_WAREHOUSE() AS warehouse,
CURRENT_DATABASE() AS database,
CURRENT_ROLE() AS role
""")
for row in cursor:
print(f"Time: {row[0]}, Warehouse: {row[1]}, DB: {row[2]}, Role: {row[3]}")
finally:
conn.close()
```
### Step 3: Create Database Objects
```sql
-- Run via connection.execute() or snowflake worksheet
CREATE DATABASE IF NOT EXISTS DEMO_DB;
CREATE SCHEMA IF NOT EXISTS DEMO_DB.MY_SCHEMA;
CREATE OR REPLACE TABLE DEMO_DB.MY_SCHEMA.USERS (
id INTEGER AUTOINCREMENT,
name VARCHAR(100) NOT NULL,
email VARCHAR(255),
created_at TIMESTAMP_NTZ DEFAULT CURRENT_TIMESTAMP()
);
INSERT INTO DEMO_DB.MY_SCHEMA.USERS (name, email)
VALUES ('Alice', '[email protected]'),
('Bob', '[email protected]');
SELECT * FROM DEMO_DB.MY_SCHEMA.USERS;
```
### Step 4: Parameterized Queries (Node.js)
```typescript
// Insert with bind parameters — prevents SQL injection
connection.execute({
sqlText: 'INSERT INTO DEMO_DB.MY_SCHEMA.USERS (name, email) VALUES (?, ?)',
binds: ['Charlie', '[email protected]'],
complete: (err, stmt, rows) => {
if (err) {
console.error('Insert failed:', err.message);
return;
}
console.log('Inserted rows:', stmt.getNumUpdatedRows());
},
});
// Fetch results with streaming for large datasets
connection.execute({
sqlText: 'SELECT * FROM DEMO_DB.MY_SCHEMA.USERS ORDER BY created_at DESC',
streamResult: true,
complete: (err, stmt) => {
if (err) { console.error(err.message); return; }
const stream = stmt.streamRows();
stream.on('data', (row) => console.log('Row:', row));
stream.on('end', () => console.log('All rows fetched'));
stream.on('error', (err) => console.error('Stream error:', err));
},
});
```
### Step 5: Parameterized Queries (Python)
```python
# Insert with bind parameters
cursor.execute(
"INSERT INTO DEMO_DB.MY_SCHEMA.USERS (name, email) VALUES (%s, %s)",
('Charlie', '[email protected]')
)
print(f"Inserted {cursor.rowcount} row(s)")
# Fetch all results
cursor.execute("SELECT * FROM DEMO_DB.MY_SCHEMA.USERS ORDER BY created_at DESC")
results = cursor.fetchall()
for row in results:
print(f"ID: {row[0]}, Name: {row[1]}, Email: {row[2]}")
# Fetch as pandas DataFrame
import pandas as pd
cursor.execute("SELECT * FROM DEMO_DB.MY_SCHEMA.USERS")
df = cursor.fetch_pandas_all()
print(df)
```
## Output
```
Connected to Snowflake!
Query result: [{ NOW: '2026-03-22T...', WAREHOUSE: 'COMPUTE_WH', DATABASE: 'DEMO_DB', ROLE: 'SYSADMIN' }]
Inserted 1 row(s)
Row: { ID: 1, NAME: 'Alice', EMAIL: '[email protected]', CREATED_AT: '...' }
```
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| `002003 (42S02): Object does not exist` | Table/DB not created yet | Run CREATE statements first |
| `000606: No active warehouse` | No warehouse set or suspended | `USE WAREHOUSE COMPUTE_WH;` or set in connection |
| `001003: SQL compilation error: syntax error` | Bad SQL syntax | Check SQL against Snowflake SQL reference |
| `100035: No space left on device` | Large result set, local disk full | Use `streamResult: true` or limit results |
## Resources
- [Executing Statements (Node.js)](https://docs.snowflake.com/en/developer-guide/node-js/nodejs-driver-execute)
- [Using the Python Connector](https://docs.snowflake.com/en/developer-guide/python-connector/python-connector-example)
- [Snowflake SQL Reference](https://docs.snowflake.com/en/sql-reference)
## Next Steps
Proceed to `snowflake-local-dev-loop` for development workflow setup.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.