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
질문됨 2년 전135회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠