Cannot query views in AWS Athena

Viewed 1057

I'm trying to create a simple view in AWS Athena, and then query that view. The initial query runs fine, and returns results. Then, I click "Create view from query", and it runs the following, which also is successful:

CREATE OR REPLACE VIEW "ios_events" AS
SELECT *
FROM my_db
WHERE context.device.type = 'ios';

However, I cannot query this created view at all. it shows up in the UI, but even when I click "Preview" for the view in the UI and it runs:

SELECT * FROM "my_db"."ios_events" limit 10;

This results in a large error starting with GENERIC_INTERNAL_ERROR: Unable to create class com.facebook.presto.execution.TaskInfo from JSON response:. Later in the error, it has the following:

...

java.lang.Thread.run(Thread.java:748) Caused by:
com.fasterxml.jackson.databind.JsonMappingException:
line 1:143: extraneous input 'from' expecting
{'ADD', 'ALL', 'SOME', 'ANY', 'AT', 'NO', 'SUBSTRING', 'POSITION', 'TINYINT', 'SMALLINT', 'INTEGER', 'DATE', 'TIME', 'TIMESTAMP', 'INTERVAL', 'YEAR', 'MONTH', 'DAY', 'HOUR', 'MINUTE', 'SECOND', 'ZONE', 'FILTER', 'OVER', 'PARTITION', 'RANGE', 'ROWS', 'PRECEDING', 'FOLLOWING', 'CURRENT', 'ROW', 'SCHEMA', 'COMMENT', 'VIEW', 'REPLACE', 'GRANT', 'REVOKE', 'PRIVILEGES', 'PUBLIC', 'OPTION', 'EXPLAIN', 'ANALYZE', 'FORMAT', 'TYPE', 'TEXT', 'GRAPHVIZ', 'LOGICAL', 'DISTRIBUTED', 'VALIDATE', 'SHOW', 'TABLES', 'VIEWS', 'SCHEMAS', 'CATALOGS', 'COLUMNS', 'COLUMN', 'USE', 'PARTITIONS', 'FUNCTIONS', 'TO', 'SYSTEM', 'BERNOULLI', 'POISSONIZED', 'TABLESAMPLE', 'ARRAY', 'MAP', 'SET', 'RESET', 'SESSION', 'DATA', 'START', 'TRANSACTION', 'COMMIT', 'ROLLBACK', 'WORK', 'ISOLATION', 'LEVEL', 'SERIALIZABLE', 'REPEATABLE', 'COMMITTED', 'UNCOMMITTED', 'READ', 'WRITE', 'ONLY', 'CALL', 'INPUT', 'OUTPUT', 'CASCADE', 'RESTRICT', 'INCLUDING', 'EXCLUDING', 'PROPERTIES', 'FUNCTION', 'LAMBDA_INVOKE', 'RETURNS', 'SAGEMAKER_INVOKE_ENDPOINT', 'NFD', 'NFC', 'NFKD', 'NFKC', 'IF', 'NULLIF', 'COALESCE', IDENTIFIER, DIGIT_IDENTIFIER, QUOTED_IDENTIFIER, BACKQUOTED_IDENTIFIER}
(through reference chain: com.facebook.presto.server.TaskUpdateRequest["fragment"]
->com.facebook.presto.sql.planner.PlanFragment["root"]
->com.facebook.presto.sql.planner.plan.OutputNode["source"]
->com.facebook.presto.sql.planner.plan.ProjectNode["assignments"]
->com.facebook.presto.sql.planner.plan.Assignments["assignments"]
->java.util.LinkedHashMap["expr_89"]) at

...

Which seems to imply the query is not structured properly. But this is just a super simple select, generated by the AWS Athena UI itself. What am I missing?

0 Answers
Related