How can I resolve the "SYNTAX_ERROR: line 1:8: SELECT * not allowed in queries without FROM clause" error in Amazon Athena?

1 minute read

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 has the correct permissions. The user or role that's querying the table must have SELECT permissions for the table. For more information, see Using Athena to query data registered with AWS Lake Formation and Permissions example scenario.

Check the table's classification

If you used the AWS Glue crawler to create the table, 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 an issue with the table schema. Fix the schema and run the crawler again. For more information, see Adding classifiers to a crawler in AWS Glue.

Related information


Using AWS Glue jobs for ETL with Athena

Querying Linux Foundation Delta Lake tables

AWS OFFICIALUpdated 3 months ago