Home > Software engineering >  AWS Athena error when running information_schema query
AWS Athena error when running information_schema query

Time:10-10

When running an information_schema query in Athena I am getting the following error:

Your query has the following error(s): 

GENERIC_INTERNAL_ERROR: java.lang.RuntimeException: java.lang.InterruptedException: sleep interrupted

This query ran against the "default" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: 277863e6-3f46-49a0-894b-e712cd49f9c0.

The error changes default to whatever database I have selected.

Script is:

SELECT t.table_schema, t.table_name, c.column_name, c.is_nullable, c.data_type
FROM   information_schema.schemata s
INNER JOIN information_schema.tables t on s.schema_name = t.table_schema
INNER JOIN information_schema.columns c on c.table_name = t.table_name AND c.table_schema = t.table_schema
WHERE c.table_catalog = 'awsdatacatalog'

CodePudding user response:

Can you try this?

SELECT t.table_schema, t.table_name, c.column_name, c.is_nullable, 
c.data_type
FROM   "information_schema"."schemata" s
INNER JOIN "information_schema"."tables" t on s.schema_name = t.table_schema
INNER JOIN "information_schema"."columns" c on c.table_name = t.table_name AND c.table_schema = t.table_schema
WHERE c.table_catalog = 'awsdatacatalog'
  • Related