내용으로 건너뛰기

AWS Athen Query error INVALID_TABLE_PROPERTY: Must provide a comma-separated enumeration to build a projected enum partition column! (property: projection.env.values)

0

I am getting the following error when querying a partitioned table.

select * from cdqwms where date between '2024-01-01' and '2024-01-02'

INVALID_TABLE_PROPERTY: Must provide a comma-separated enumeration to build a projected enum partition column! (property: projection.env.values)

CREATE EXTERNAL TABLE cdqwms( completeness decimal(38,18) COMMENT 'from deserializer', consistency decimal(38,18) COMMENT 'from deserializer', currency decimal(38,18) COMMENT 'from deserializer', publication_event_id string COMMENT 'from deserializer', uniqueness decimal(38,18) COMMENT 'from deserializer') PARTITIONED BY ( env string COMMENT 'The environment of the source of the cdq output', date string COMMENT 'The date, yyyy-MM-dd, of the cdqwms output') ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe' WITH SERDEPROPERTIES ( 'case.insensitive'='TRUE', 'dots.in.keys'='FALSE', 'ignore.malformed.json'='TRUE') STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' LOCATION 's3://x/x/x/' TBLPROPERTIES ( 'classification'='json', 'projection.date.format'='yyyy-MM-dd', 'projection.date.interval'='1', 'projection.date.interval.unit'='DAYS', 'projection.date.range'='2024-03-05,NOW+1DAY', 'projection.date.type'='date', 'projection.enabled'='true', 'projection.env.type'='enum', 'projection.env.values'='', 'storage.location.template'='s3://x/x/x/env=${env}/date=${date}/', 'typeofdata'='file')

질문됨 일 년 전310회 조회
1개 답변
0

Hello,

From the shared table DDL, I could see that you were using env as a partitioned column and defined the env partition type as enum but haven’t provided the enum values for it and hence the error. Use the enum type for partition columns whose values are members of an enumerated set[1] (for example, airport codes or AWS Regions) and not empty. Refer the below docs . Would request you to provide the enum values for the env column and then check.

https://docs.aws.amazon.com/athena/latest/ug/partition-projection-supported-types.html#partition-projection-enum-type

'projection.env.type'='enum', 'projection.env.values’='' ==> this is empty and hence the error

Thank you!

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

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

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

관련 콘텐츠