Socket
Socket
Sign inDemoInstall

snowflake-sdk-promise

Package Overview
Dependencies
193
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    snowflake-sdk-promise

A Promise-based, TypeScript-friendly wrapper for the Snowflake SDK


Version published
Weekly downloads
26
increased by136.36%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

snowflake-sdk-promise npm node

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.

Installation

  • npm i snowflake-sdk-promise

Basic usage

import { Snowflake } from 'snowflake-sdk-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'
  });

  const rows = await snowflake.execute(
    'SELECT COUNT(*) FROM CUSTOMER WHERE C_MKTSEGMENT=:1',
    ['AUTOMOBILE']
  );

  console.log(rows);
}

main();

Connecting

The constructor takes up to three arguments:

new Snowflake(connectionOptions, [ loggingOptions, [ configureOptions ] ]) OR new SnowflakePool(connectionOptions, [ loggingOptions, [ configureOptions ] ])

More examples

Credits

This project has started as a fork of snowflake-promise

Keywords

FAQs

Last updated on 08 Jun 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc