Schema of AWS Athena table created with CDK V2 could not be displayed

0

I created an Athena table using Glue

import * as glue from '@aws-cdk/aws-glue-alpha'

    const dataWarehouse = new glue.Table(this, `data_warehouse`, {
      database: db,
      tableName: `data_warehouse`,
      columns: getDataColumns(),
      dataFormat: dataFormatProps,
      enablePartitionFiltering: false,
      bucket,
      s3Prefix: 'data_lake/data_warehouse',
      storedAsSubDirectories: false,
      partitionKeys: [
        {
          name: 'my_partition',
          type: glue.Schema.STRING,
        },
        {
          name: 'year',
          type: glue.Schema.INTEGER,
        },
        {
          name: 'month',
          type: glue.Schema.INTEGER,
        },
        {
          name: 'day',
          type: glue.Schema.INTEGER,
        },
      ],
    });

It works as expected. Except when I'm trying to extract it's schema:

SHOW CREATE TABLE `estr_data_warehouse`;

It shows an error with not much of useful information.

[ErrorCategory:USER_ERROR, ErrorCode:DDL_FAILED], Detail:FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.NullPointerException
This query ran against the "some_db" database, unless qualified by the query. Please post the error message on our forum  or contact customer support  with Query Id: fffd8a82-b222-4774-a6fa-541e19cc4431
  • Hard to tell what is missing. It would help sharing the actual created table metadata and the stacktrace when you do the same show on Presto or SparkSQL

profile picture
Smotrov
질문됨 7달 전85회 조회
답변 없음

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

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

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