My client have database in AWS s3 ORC format. Now i have to query to fetch data form s3. to do that i used Amazon Athena but the problem is that it's cost price to use athena. so just wanted to ask is there any other way to query ORC format in node js. below is the code of Athena i used.
"use strict";
const AthenaExpress = require("athena-express"),
aws = require("aws-sdk"),
awsCredentials = {
region: "<region>"
};
aws.config.update(awsCredentials);
const athenaExpressConfig = {
aws,
s3: "s3://<bucketName>/<folder>/<folder>",
getStats: true
};
const athenaExpress = new AthenaExpress(athenaExpressConfig);
// console.log('athenaExpress');
// console.log(athenaExpress);
//Invoking a query on Amazon Athena
(async () => {
let query = {
sql: "SELECT * FROM cityMaster LIMIT 3",
db: "<dbName>",
getStats: true
};
try {
let results = await athenaExpress.query(query);
console.log(results);
} catch (error) {
console.log(error);
}
})();
I have been googling but didn't get any tutorial or blog to query ORC format in nodejs. Can someone please guide me how to access S3 ORC data in node js.