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
preguntada hace 2 años135 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas