AWS Glue API get-partitions can't seem to cope with the partition column name "key" in the `expression` filter

0

I created a AWS Glue table with the following columns:

  • key : string (partition column)
  • x : int

The following command works as expected:

aws glue get-partitions --database-name glue --table-name repro100 --region us-east-2

On the other hand, the command:

aws glue get-partitions --database-name glue --table-name repro100 --region us-east-2  --expression="key=part1"

returns the following exception message:

An error occurred (InvalidInputException) when calling the GetPartitions operation:

Doing the same call via Java AWS API I could retrieve the following error code:

HIVE_METASTORE_ERROR  code 16777216

When using a different partition column name (e.g. : foobar ) the expression filter can be handled successfully. I assume that the problem is linked to the usage of the column name key in the expression filter. Any hints on how to escape the column name in the filter ?

Out of curiosity, what exactly means HIVE_METASTORE_ERROR code 16777216 ?

질문됨 2년 전1176회 조회
1개 답변
0

Hello,

By using "key" as one of the column names in AWS Glue table, get-partitions API call returns error as stated

An error occurred (InvalidInputException) when calling the GetPartitions operation:

I would recommend you to please change the column "key" name as "key1" or any other name in Glue data catalog which is not in the reserved words as a workaround.

Regarding the Hive error code 16777216, it usually happens when the Hive metastore does not return any data for a partition. Here in your case since "key" is not being recognized as a partition, the above error code is returned.

AWS
지원 엔지니어
답변함 2년 전

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

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

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

관련 콘텐츠