Problem with data showing null value when executing Query twice in athena

0

I fetched data from S3 from athena and ran a Query that looked at 10 rows.

The first run shows the table, the second table gets null values.

If you delete the result folder executed in athena from within the bucket, it will be executed again.

But I want to check the table without deleting the folder.

Thanks for your help.

asked 2 years ago272 views
1 Answer
1
Accepted Answer

Based on what is happening, it seems as though the query results location is writing into the same location as the Athena table and that seems to be causing the issue. I suggest the following steps to set up another location for the Athena query results.

  1. Click on Settings tab in the Athena console
  2. Click the manage button
  3. Choose the bucket (Ideally we create a separate bucket for Athena). you can choose a folder result such as bucket-name/athena_results/team_name/user_name. If you end up using the same bucket as the data location, ensure the folder location and the athena results location are different.
profile pictureAWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions