79588787

Date: 2025-04-23 14:03:54
Score: 0.5
Natty:
Report link

Late update, but this format does work. As far as I can tell, the 'projection.date.partition.format' property just needed all single quotes rather than the doubles:

PARTITIONED BY ( 
  `partition_date` string)
ROW FORMAT DELIMITED 
  FIELDS TERMINATED BY ',' 
STORED AS INPUTFORMAT 
  'org.apache.hadoop.mapred.TextInputFormat' 
OUTPUTFORMAT 
  'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
  's3://prefix'
TBLPROPERTIES (
  'classification'='csv', 
  'has_encrypted_data'='true', 
  'projection.enabled'='true', 
  'projection.partition_date.format'='\'year=\'yyyy/\'month=\'MM/\'day=\'dd', 
  'projection.partition_date.interval'='1', 
  'projection.partition_date.interval.unit'='DAYS', 
  'projection.partition_date.range'='NOW-3YEARS,NOW', 
  'projection.partition_date.type'='date', 
  'skip.header.line.count'='1', 
  'storage.location.template'='s3://prefix/${partition_date}', 
  'transient_lastDdlTime'='1734535763')
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Josh Knize