Salta al contenuto

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')

posta 2 anni fa311 visualizzazioni
1 Risposta
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
TECNICO DI SUPPORTO
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.