简体   繁体   中英

AWS Athena error when running information_schema query

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'

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'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM