Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty response when using pagination #69

Open
camilinha opened this issue Oct 29, 2021 · 2 comments
Open

Empty response when using pagination #69

camilinha opened this issue Oct 29, 2021 · 2 comments

Comments

@camilinha
Copy link

Hi, I ran into an unexpected situation using pagination parameter.

The queries where I use pagination parameter sometimes return with an empty response. But if I run the same query on AWS console, there are results. The S3 file also has the correct response, but the library says otherwise.

If I take out the pagination parameter this problem never happens. But the case is that I have a query with many results, so I need to use the pagination.

Anyone has the same problem? Is there a solution for this?

Thanks!

@ledoux7
Copy link

ledoux7 commented Nov 13, 2021

I was experiencing it too. What I think is happening is that the previous query/pagination is cached somehow between runs so when you have run through all the results you get empty results every query afterwards.

I'm running it in a lambda and a workaround that I found that fixed it was moving the initialization to inside the exports.handler like this

"use strict";

const AthenaExpress = require("athena-express");
const AWS = require("aws-sdk");

exports.handler = async (event) => {
    const athenaExpressConfig = {
    	aws: AWS,
    };
    const athenaExpress = new AthenaExpress(athenaExpressConfig);
...

@ghdna
Copy link
Owner

ghdna commented Jan 17, 2022

Pushed a new version on NPM. Give this one a try please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants