How do I resolve the error "FAILED: ParseException line 1:X missing EOF at '-' near 'keyword'" in Athena?
Last updated: 2021-11-08
When I run an MSCK REPAIR TABLE or SHOW CREATE TABLE statement in Amazon Athena, I get an error similar to the following: "FAILED: ParseException line 1:X missing EOF at '-' near 'keyword'".
You get this error when the database name specified in the DDL statement contains a hyphen ("-"). AWS Glue allows database names with hyphens. However, underscores (_) are the only special characters that Athena supports in database, table, view, and column names.
Your query has the following error(s): FAILED: ParseException line 1:7 missing EOF at '-' near 'alb' This query ran against the "alb-database1" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: cc5c1234-4c12-4dcb-a123-bff954b305eb.
To resolve this issue, recreate the database with a name that doesn't contain any special characters other than underscore (_).