Athena CTAS Internal Error

0

Executing a simple CTAS query produces an internal error:
The Query:

CREATE TABLE "myDatabase"."newTable" AS
SELECT *
FROM "myDatabase"."oldTable";

The Error:

[ErrorCode: INTERNAL_ERROR_QUERY_ENGINE] Amazon Athena an experienced an internal error while executing this query. Please contact AWS support for further assistance. You will not be charged for this query. We apologize for the inconvenience.

Syntax From AWS Documentation https://docs.aws.amazon.com/athena/latest/ug/ctas-examples.html

CREATE TABLE new_table AS 
SELECT * 
FROM old_table;

Either this error message is incorrect/completely useless, or there has been a change made to the CTAS functionality.

Edited by: Jfarrin1 on Mar 22, 2019 2:23 AM

질문됨 5년 전973회 조회
1개 답변
0

The issue is that CTAS queries do not work with table names using special characters. So any table name using - produces this error.
For information about the CTAS query syntax, please see Considerations and Limitations for CTAS Queries https://docs.aws.amazon.com/athena/latest/ug/considerations-ctas.html. It is stated there, quoting:
"Table, database, or column names for CTAS queries should not contain quotes or backticks. To ensure this, check that your table, database, or column names do not represent reserved words: https://docs.aws.amazon.com/athena/latest/ug/reserved-words.html, and do not contain special characters (which require enclosing them in quotes or backticks). For more information, see Names for Tables, Databases, and Columns, in https://docs.aws.amazon.com/athena/latest/ug/tables-databases-columns-names.html."

Edited by: JM-AWS on Mar 25, 2019 1:38 PM

Edited by: JM-AWS on Mar 25, 2019 1:42 PM

Edited by: JM-AWS on Mar 25, 2019 1:43 PM

답변함 5년 전

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

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

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

관련 콘텐츠