constructor(config) { super(); this.config = { accessKeyId: process.env.CUBEJS_AWS_KEY, secretAccessKey: process.env.CUBEJS_AWS_SECRET, region: process.env.CUBEJS_AWS_REGION, S3OutputLocation: process.env.CUBEJS_AWS_S3_OUTPUT_LOCATION, ...config }; this.athena = new AWS.Athena(this.config); this.athena.startQueryExecutionAsync = promisify(this.athena.startQueryExecution.bind(this.athena)); this.athena.stopQueryExecutionAsync = promisify(this.athena.stopQueryExecution.bind(this.athena)); this.athena.getQueryResultsAsync = promisify(this.athena.getQueryResults.bind(this.athena)); this.athena.getQueryExecutionAsync = promisify(this.athena.getQueryExecution.bind(this.athena)); }
} : s)) ); const { QueryExecutionId } = await this.athena.startQueryExecutionAsync({ QueryString: queryString, ResultConfiguration: { const queryExecution = await this.athena.getQueryExecutionAsync({ QueryExecutionId }); }, options); for ( let results = await this.athena.getQueryResultsAsync({ QueryExecutionId }); results; results = results.NextToken && (await this.athena.getQueryResultsAsync({ QueryExecutionId, NextToken: results.NextToken }))