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
gefragt vor 2 Jahren135 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen