4
votes

While running MSCK repair tablename command, athena query editor returns an error tables not in metastore. But table exists and I can query on that table.

I have data kept in S3 in form of parquet files, partitioned with hash as partition key (partitions look like hash=0, hash=100 and so on), and I am running glue crawler to create a table in Athena.

I know partitions not in metastore is common issues and there are solutions to fix it. But I am not able to find the solution for tables not in metastore

Has anyone solved similar issue, or have an idea what could be wrong?

2

2 Answers

0
votes

Does the IAM role being used to execute the query have permission to read that S3 bucket? I had this error when running a query from Lambda using a role which did not have ListBucket permission on the bucket in question.

0
votes

I solved this by selecting the correct database from dropdown menu on the left of query editor. I had run the previous setup query on sampledb and then i was trying to run a new query but the new tab changed the db to default. Changing default to sampledb fixed the issue!