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

1 minutos de lectura
0

When I run an Amazon Athena query, I get the error "SYNTAX_ERROR: line 1:8: SELECT * not allowed in queries without FROM clause".

Resolution

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 in AWS Glue.


Related information

SHOW CREATE TABLE

Using AWS Glue jobs for ETL with Athena

OFICIAL DE AWS
OFICIAL DE AWSActualizada hace 5 meses