How to use presto-client - 2 common examples

To help you get started, we’ve selected a few presto-client 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 cube-js / cube.js / packages / cubejs-prestodb-driver / driver / PrestoDriver.js View on Github external
this.config = {
      host: process.env.CUBEJS_DB_HOST,
      port: process.env.CUBEJS_DB_PORT,
      catalog: process.env.CUBEJS_DB_CATALOG,
      schema: process.env.CUBEJS_DB_SCHEMA,
      user: process.env.CUBEJS_DB_USER,
      basic_auth: process.env.CUBEJS_DB_PASS ? {
        user: process.env.CUBEJS_DB_USER,
        password: process.env.CUBEJS_DB_PASS
      } : undefined,
      ...config
    };

    this.catalog = this.config.catalog;
    this.client = new presto.Client(this.config);
  }
github tagomoris / shib / lib / shib / engines / presto / index.js View on Github external
var Executer = exports.Executer = function(conf, logger){
  if (conf.name !== 'presto')
    throw "executer name mismatch for presto:" + conf.name;
  if (!conf.host)
    throw "host MUST be specified for presto executer";
  if (!conf.port)
    throw "port MUST be specified for presto executer";
  if (!conf.catalog)
    throw "catalog MUST be specified for presto executer";

  this.logger = logger;
  this._client = new Client({
    host: conf.host,
    port: conf.port,
    user: conf.user,
    catalog: conf.catalog,
    jsonParser: JSONbig
  });
};

presto-client

Distributed query engine Presto/Trino client library for node.js

MIT
Latest version published 12 months ago

Package Health Score

64 / 100
Full package analysis

Popular presto-client functions