How can I resolve the "SYNTAX_ERROR: line 1:8: SELECT * not allowed in queries without FROM clause" error in Athena?
Last updated: 2021-04-08
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, then 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 be sure that the following are true:
- The table's classification isn't UNKNOWN.
- 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.