How to use snowflake-sdk - 3 common examples

To help you get started, we’ve selected a few snowflake-sdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github taskrabbit / empujar / lib / connections / snowflake.js View on Github external
connection.prototype.connect = function(callback){
    var self = this;
    self.connection = snowflake.createConnection(self.options);

    self.connection.connect(function(err, conn) {
        if (err) {
            self.book.logger.log('Unable to connect: ' + err.message, 'error');
            callback(err);
        } else {
            self.showTables(function(error, tables){
                callback(error);
            });

        }
    });
};
github cube-js / cube.js / packages / cubejs-snowflake-driver / driver / SnowflakeDriver.js View on Github external
constructor(config) {
    super();
    this.config = {
      account: process.env.CUBEJS_DB_SNOWFLAKE_ACCOUNT,
      region: process.env.CUBEJS_DB_SNOWFLAKE_REGION,
      warehouse: process.env.CUBEJS_DB_SNOWFLAKE_WAREHOUSE,
      database: process.env.CUBEJS_DB_NAME,
      username: process.env.CUBEJS_DB_USER,
      password: process.env.CUBEJS_DB_PASS,
      ...config
    };
    const connection = snowflake.createConnection(this.config);
    this.initialConnectPromise = new Promise(
      (resolve, reject) => connection.connect((err, conn) => (err ? reject(err) : resolve(conn)))
    );
  }
github dataform-co / dataform / api / dbadapters / snowflake.ts View on Github external
return await new Promise((resolve, reject) => {
      snowflake
        .createConnection({
          account: snowflakeCredentials.accountId,
          username: snowflakeCredentials.username,
          password: snowflakeCredentials.password,
          database: snowflakeCredentials.databaseName,
          warehouse: snowflakeCredentials.warehouse,
          role: snowflakeCredentials.role
        })
        .connect((err, conn) => {
          if (err) {
            reject(err);
          } else {
            resolve(conn);
          }
        });
    });

snowflake-sdk

Node.js driver for Snowflake

Apache-2.0
Latest version published 14 days ago

Package Health Score

85 / 100
Full package analysis

Popular snowflake-sdk functions

Similar packages