Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
}
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
});
};