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 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南