Athena Query error
25 Feb 2017
Athena simply gives a message saying failed to run query with very little input as to where the query failed
An error occurred when executing the SQL command:
Failed to run query
Execution time: 0.03s
Statement 1 of 1 finished
1 statement failed.
This is not very useful for debugging. The only workaround I have found so far is to slowly remove parts of the create table statement or the query and try running the query.
In case of DDLs, here’s where I found the most problems.
- Not using
external keyword
when creating a table - using Integer instead of Int in the table definition
- Specifying a location that does not match the S3:// format
In case of queries, it is usually a missing comma or an additional comma at the end of a given column name or expression. And the good-old mismatch parantheses.