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
asked 2 months ago144 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions