partition projection doesn't work... [ErrorCode: INTERNAL_ERROR_QUERY_ENGINE] Amazon Athena experienced an internal error

0

I have this table:

  RetsIncomingTable:
    Type: AWS::Glue::Table
    Properties:
      CatalogId: !Ref AWS::AccountId
      DatabaseName: !Ref TheDatabase
      TableInput:
        Name: incoming
        TableType: EXTERNAL_TABLE
        Parameters: 
          classification: json
          projection.enabled: 'true'
          projection.partition_id.type: 'injected'
          storage.location.template: !Sub 's3://${Bucket}/incoming/${!partition_id}/'
        PartitionKeys:
          - Name: partition_id
            Type: string
        StorageDescriptor:
          Columns:
            - Name: systemid
              Type: string
            - Name: eventTimestamp
              Type: string
            - Name: eventType
              Type: string
            - Name: source
              Type: string
            - Name: updtDate
              Type: string
            - Name: rawdata
              Type: string
            - Name: media
              Type: string
          InputFormat: org.apache.hadoop.hive.ql.io.HiveInputFormat
          OutputFormat: org.apache.hadoop.hive.ql.io.HiveOutputFormat
          SerdeInfo:
            SerializationLibrary: org.openx.data.jsonserde.JsonSerDe
            Parameters:
              'serialization.format': '1'
          Location: !Sub 's3://${Bucket}/incoming/'

when I do select * from incoming where partition_id = 'xx', I get:

[ErrorCode: INTERNAL_ERROR_QUERY_ENGINE] Amazon Athena 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. This query ran against the "test-xyz" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: ee7d1d16-da1f-42bc-97eb-c70ac1d3a4d3

What's causing this, and how can I fix it?

AlexR
已提问 2 个月前149 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则