Getting error GENERIC_INTERNAL_ERROR: com.facebook.presto.sql.tree.CreateView cannot be cast to com.facebook.presto.sql.tree.Query

0

Hi! I created a presto view from a data catalog using CfnTable syntax and it is generating the correct CVAS query. However, when I query the view I get the following error.

GENERIC_INTERNAL_ERROR: com.facebook.presto.sql.tree.CreateView cannot be cast to com.facebook.presto.sql.tree.Query

Here is the generated CVAS query,

create or replace view fiber_span_geojson_vw as select userIdentity.principalId as service_principal, eventName, eventTime, cast(json_extract(requestParameters, '$.key') as varchar) as requested_file from "cloudtraildbtest"."perfecttablecreated" where eventName = 'GetObject' and cast(json_extract(requestParameters, '$.key') as varchar) LIKE '%fiber_span_geojson/%'

When I manually execute the query, it is a success and I'm able to see the data. Can someone help me understand why the DDL query is failing internally to generate the view?

  • Most likely a parsing exception on your query. Share the steps to reproduce the one query that fails.

AWS
asked 2 years ago135 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions