How do I resolve the error "FAILED: ParseException line 1:X missing EOF at '-' near 'keyword'" in Athena?
Last updated: 2020-04-15
When I run an MSCK REPAIR TABLE or SHOW CREATE TABLE statement in Amazon Athena, I get an error like this: "FAILED: ParseException line 1:X missing EOF at '-' near 'keyword'".
This error happens 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 special characters other than underscore (_).