Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
snowflake-promise
Advanced tools
Readme
A Promise-based interface to your Snowflake data warehouse.
This is a wrapper for the Snowflake SDK for Node.js. It provides a Promise-based API instead of the core callback-based API.
npm i snowflake-promise
const Snowflake = require('snowflake-promise').Snowflake;
// or, for TypeScript:
import { Snowflake } from 'snowflake-promise';
async function main() {
const snowflake = new Snowflake({
account: '<account name>',
username: '<username>',
password: '<password>',
database: 'SNOWFLAKE_SAMPLE_DATA',
schema: 'TPCH_SF1',
warehouse: 'DEMO_WH'
});
await snowflake.connect();
const rows = await snowflake.execute(
'SELECT COUNT(*) FROM CUSTOMER WHERE C_MKTSEGMENT=:1',
['AUTOMOBILE']
);
console.log(rows);
}
main();
The constructor takes up to three arguments:
new Snowflake(connectionOptions, [ loggingOptions, [ configureOptions ] ])
connectionOptions
loggingOptions
logSql
(optional, function): If provided, this function will be called to log SQL
statements. For example, set logSql
to console.log
to log all issued SQL
statements to the console.logLevel
(optional: 'error' | 'warn' | 'debug' | 'info' | 'trace'
): Turns on
SDK-level logging.configureOptions
ocspFailOpen
(optional, boolean) (default: true
): Enables OCSP fail-open
functionality. See https://www.snowflake.com/blog/latest-changes-to-how-snowflake-handles-ocsp/ for more information.then
syntax (and older versions of Node.js)
FAQs
A Promise-based, TypeScript-friendly wrapper for the Snowflake SDK
The npm package snowflake-promise receives a total of 17,495 weekly downloads. As such, snowflake-promise popularity was classified as popular.
We found that snowflake-promise demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.