Open aaaferns opened 2 years ago
I am experiencing the same issue on v7.1
can you provide more steps for me to replicate this issue?
I have written an aws lambda node js script:
` const AthenaExpress = require("athena-express"), aws = require("aws-sdk");
const athenaExpressConfig = { aws, db: "db", getStats: true };
const athenaExpress = new AthenaExpress(athenaExpressConfig);
exports.handler = async (event, context, callback) => { const sqlQuery = 'SELECT * FROM "tags"';
try {
let results = await athenaExpress.query(sqlQuery);
callback(null, results);
} catch (error) {
callback(error, null);
}
}; `
Seems like removing Catalog from this function removes the issue:
const params = {
QueryString: config.sql,
WorkGroup: config.workgroup,
ResultConfiguration: {
OutputLocation: config.s3Bucket,
},
QueryExecutionContext: {
Database: config.db,
Catalog: config.catalog,
},
};
I am getting this error message when I submit a query. "UnexpectedParameter: Unexpected key 'Catalog' found in params.QueryExecutionContext" Followed the instructions as per ReadMe. I am not suppling this parameter at all. this is my config. const athenaExpressConfig = { aws: AWS, s3:
s3://${process.env.ENV_ATHENA_S3BUCKET}
, }; Query { "query": "select datapointid, journeyid, capturedtimestamp, location from vehicle_movements_daily LIMIT 100", "db": "vm_db" } First I thought that it was a configuration or IAM role issue and therefore I tried using athenaClient and I was able to get results without issue( only timeout issue which is expected).