How can I resolve the error "SYNTAX_ERROR: line 1:8: SELECT * not allowed in queries without FROM clause" in Athena?
Last updated: 2020-12-16
When I run an Amazon Athena query, I get the error "SYNTAX_ERROR: line 1:8: SELECT * not allowed in queries without FROM clause".
Check the table's permissions
If the table is registered with AWS Lake Formation, be sure that the user or role that's querying the table has SELECT permissions for the table. For more information, see Using Athena to query data registered with Lake Formation and Permissions example scenario.
Check the table's classification
If you created the table using the AWS Glue crawler, then the Athena CREATE TABLE statement lists the classification in the TBLPROPERTIES section. For an example of a CREATE TABLE statement that lists a classification, see Using AWS Glue jobs for ETL with Athena.
Be sure that the table's classification isn't UNKNOWN, and that the table has defined columns. If the classification is UNKNOWN, then there's a problem with the table schema. Fix the schema and run the crawler again. For more information, see Adding classifiers to a crawler.