Athena tables listing provides: Unknown exception occurred.

0

Running show tables in Athena console is giving error: [ErrorCategory:USER_ERROR, ErrorCode:DDL_FAILED], Detail:FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Unknown exception occurred. (Service: AmazonDataCatalog; Status Code: 500; Error Code: InternalServiceException; Request ID: e022efe8-84f7-42c0-9a61-780a34b2e035; Proxy: null)) This query ran against the "testcase4_db-191149430601" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: 6cc60bb3-a1eb-463a-a1dc-f680500c378e

I am able to run select queries on tables in above database.

AWS
asked 7 months ago211 views
1 Answer
0

Hello.

The error you provided hints at an issue related SHOW TABLES command. Ensure that the IAM role or user associated with Athena has permissions like glue:GetTables, glue:GetDatabase, s3:GetObject, s3:PutObject, etc.

The error might be occurring because there's an inconsistency between what's registered in the Glue Data Catalog and what exists in the underlying S3 storage. To troubleshoot: Verify the tables registered in the Glue Data Catalog. Check the underlying S3 path for each table to ensure data/files exist as expected. Sometimes, manually removing and re-adding the table metadata to Glue can solve such inconsistencies.

Best regards, Andrii

profile picture
EXPERT
answered 7 months 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