snowflake-sdk-patterns

Featured

Apply production-ready Snowflake SDK patterns for snowflake-sdk and snowflake-connector-python. Use when implementing connection pooling, async execute wrappers, streaming results, or establishing team coding standards for Snowflake. Trigger with phrases like "snowflake SDK patterns", "snowflake best practices", "snowflake code patterns", "idiomatic snowflake", "snowflake connection pool".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Snowflake SDK Patterns ## Overview Production-ready patterns for `snowflake-sdk` (Node.js) and `snowflake-connector-python` using real driver APIs. ## Prerequisites - Completed `snowflake-install-auth` setup - Understanding of callback-to-promise conversion patterns - Familiarity with Snowflake's callback-based Node.js API ## Instructions ### Step 1: Connection Pool (Node.js) ```typescript // src/snowflake/pool.ts import snowflake from 'snowflake-sdk'; interface PoolConfig { max: number; idleTimeoutMs: number; } class SnowflakePool { private pool: snowflake.Connection[] = []; private available: snowflake.Connection[] = []; private waiting: ((conn: snowflake.Connection) => void)[] = []; private config: PoolConfig; constructor( private connConfig: snowflake.ConnectionOptions, config: Partial<PoolConfig> = {} ) { this.config = { max: 10, idleTimeoutMs: 60000, ...config }; } async acquire(): Promise<snowflake.Connection> { // Return available connection if (this.available.length > 0) { return this.available.pop()!; } // Create new if under limit if (this.pool.length < this.config.max) { const conn = snowflake.createConnection(this.connConfig); await new Promise<void>((resolve, reject) => { conn.connect((err) => (err ? reject(err) : resolve())); }); this.pool.push(conn); return conn; } // Wait for one to become available return new Promise((resolve) => { t...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category