snowflake-sdk

Snowflake's official Node.js driver for connecting JavaScript and TypeScript applications to its cloud data warehouse

SDK
npm
v3.3.0
143stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
88/100Excellent
Development Activity92
Maintenance96
Community84
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
65/100Good
Architecture76
Code Quality78
Innovation62
Learning Curve45

snowflake-sdk (published from the snowflake-connector-nodejs repository) is Snowflake, Inc.’s official Node.js client for its cloud data warehouse. It exposes a connection/statement API in both callback and Promise styles, so it slots into existing Node.js codebases without forcing an async pattern, and it supports connection pooling via generic-pool for services that need to reuse warm connections across requests.

Under the hood it talks to Snowflake’s REST-based query execution protocol, handling result-set streaming, bind parameters for parameterized queries, and the PUT/GET file-staging commands used to bulk-load or unload data through S3, Azure Blob Storage, or GCS. It ships a wide authentication surface — username/password, key-pair JWT, native and external OAuth (including client-credentials and PAT flows), Okta/browser SSO, and workload-identity federation for cloud-native deployments — reflecting the enterprise identity requirements of the accounts that run on Snowflake.

The project is undergoing an incremental JS-to-TypeScript migration (new files are written in TypeScript, existing .js files are converted opportunistically), giving consumers partial but growing type coverage today via the shipped index.d.ts declarations, with the rest of the internals still plain JavaScript.

What You Get

  • A Connection object with both callback and Promise-returning APIs for executing statements and fetching results
  • Built-in connection pooling (createPool) backed by generic-pool, including factory create/destroy/validate hooks for pool health
  • Bulk data transfer via PUT/GET staging commands, with cloud-storage upload/download utilities for S3, Azure Blob, and GCS
  • A wide authentication matrix: password, key-pair JWT, native/external OAuth (authorization-code, client-credentials, PAT), Okta/browser SSO, and workload-identity federation
  • A pluggable logger interface (SnowflakeLogger) so pino, bunyan, console, or a wrapped Winston instance can receive the driver’s level-filtered, secret-masked log output
  • Partial TypeScript typings (index.d.ts) covering the public connection/statement surface, with an in-progress migration of internals from JS to TS

Common Use Cases

  • A Node.js backend service executes parameterized SQL against Snowflake as part of an API or internal tooling layer
  • A data pipeline written in Node.js bulk-loads files into Snowflake stages via PUT, then triggers a COPY INTO to ingest them
  • A serverless or containerized service uses createPool to reuse a small set of warm Snowflake connections across concurrent invocations
  • An application authenticates end users through Okta SSO or OAuth rather than static Snowflake credentials, using the driver’s built-in auth flows

Under The Hood

Architecture The driver is built around a Core() factory (lib/core.js) that wires together a Connection class, ConnectionConfig, and ConnectionContext (which bundles config with an injectable HTTP client), then exposes createConnection/createPool/serializeConnection/deserializeConnection as the public surface consumed by lib/snowflake.ts. Connection pooling is layered on top via a ConnectionFactory wrapping generic-pool, with explicit create/destroy/validate hooks and drain-on-error handling for the pool’s waiting-client queue. Authentication, HTTP transport, and file transfer are each their own pluggable subsystem (lib/authentication/, lib/http/, lib/file_transfer_agent/) selected at connection-config time rather than hardcoded, which keeps the core connection/statement flow decoupled from how a given deployment authenticates or stages files.

Tech Stack Written for Node.js 20+, with an incremental JavaScript-to-TypeScript migration in progress (strict tsconfig.json, node16 module resolution, new files authored in TS, existing .js files converted opportunistically). HTTP transport runs on axios; cloud file staging depends on AWS SDK v3 (@aws-sdk/client-s3, client-sts), @azure/storage-blob, and google-auth-library; authentication pulls in jsonwebtoken and oauth4webapi; default logging goes through winston. Build/lint/format tooling is oxlint + prettier, enforced via husky pre-commit hooks and lint-staged, with a native sf_mini_core NAPI binding built via @napi-rs/cli for performance-sensitive internals.

Code Quality Extensive test coverage across unit, integration, and authentication-specific suites (well over a hundred test files under test/), run with mocha, coverage tracked via nyc, mocking done with sinon/rewiremock, and HTTP-level mocking via wiremock. CI (GitHub Actions) runs build-and-test and lint workflows plus a semgrep security scan on every change. Comment density is high — JSDoc-style annotations cover a large share of lines in core modules like connection.js and core.js — though the codebase is still a mix of typed and untyped modules mid-migration.

What Makes It Unique The authentication surface is unusually broad for a database driver: beyond password and key-pair auth it supports multiple OAuth flavors (authorization-code, client-credentials, PAT), Okta/browser SSO, and workload-identity federation for cloud-native deployments, reflecting Snowflake’s enterprise identity requirements. The pluggable customLogger interface lets any logger conforming to a five-method contract fully replace the built-in logging with documented adapters for pino, bunyan, console, and Winston. Configurable OCSP fail-open/fail-closed behavior gives operators explicit control over certificate-revocation-checking trade-offs rather than baking in one policy.

Used by 11 apps in this directory

TypeScript
99%
Other

Activepieces

Automation · AI Assistants

24,298

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
64
Dependency
Built with
TypeScript99%
Updated today
TypeScript
69%
Other

Budibase

Low Code Platforms · No Code Platforms

28,260

Build AI agents, automations, and internal apps on a single open-source platform with full self-hosting control.

View details
91
Repo Health
81
Technical
63
Dependency
Built with
TypeScript69%
Svelte26%
Updated 2 days ago
TypeScript
45%
Other

Convex Backend

Developer Tools · Databases

12,494

Open-source reactive database that lets developers build live-updating apps with pure TypeScript, strong consistency, and real-time subscriptions—no separate API layer required.

View details
87
Repo Health
82
Technical
68
Dependency
Built with
TypeScript45%
Rust43%
Updated 2 days ago
TypeScript
82%
MIT

evidence

Analytics · Data Engineering

6,911

Turn SQL queries and markdown files into polished, interactive data apps and business intelligence reports — no drag-and-drop, no GUI, just code.

View details
87
Repo Health
79
Technical
64
Dependency
Built with
TypeScript82%
Svelte18%
Updated 3 days ago
TypeScript
97%
Other

GrowthBook

Developer Tools · Analytics · Monitoring

8,299

Open source feature flags, A/B testing, and warehouse-native experimentation that queries your existing data infrastructure—no data movement required.

View details
92
Repo Health
85
Technical
63
Dependency
Built with
TypeScript97%
Updated yesterday
TypeScript
97%
Other

Infisical

Security · Devops

29,145

The open-source platform for secrets, certificates, privileged access, and AI agent security — all in one self-hostable system.

View details
91
Repo Health
84
Technical
65
Dependency
Built with
TypeScript97%
Updated yesterday
TypeScript
84%
Apache 2.0

ktx

Data Engineering · Analytics · AI Development

1,577

ktx builds a self-improving context layer over your data warehouse so AI agents like Claude Code and Codex query it with approved metric definitions instead of reinventing SQL logic from scratch.

View details
76
Repo Health
85
Technical
72
Dependency
Built with
TypeScript84%
Updated 4 days ago
TypeScript
96%
Other

Lightdash

Analytics · Data Engineering

6,119

The open-source Looker alternative that turns your dbt project's metrics and dimensions into governed, self-serve charts and dashboards — no license key required.

View details
93
Repo Health
84
Technical
64
Dependency
Built with
TypeScript96%
Updated yesterday
TypeScript
92%
Other

n8n

Automation · No Code Platforms

203,555

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

View details
95
Repo Health
87
Technical
66
Dependency
Built with
TypeScript92%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search