我的配置单元表被列“ job_id”分区。当我将数据转储到表的hdfs位置时,它正在创建名称为“ JOB_ID”的分区,而我的配置单元表无法识别它。
我尝试了msck修复表命令,但也没有帮助。
答案 0 :(得分:0)
对于外部Hive表,您需要手动添加新分区,如下所示:
ALTER TABLE table_name ADD PARTITION (job_id='927') location 'hdfs://some_location/job_id=927'
答案 1 :(得分:0)
I found out that the partition name should always be in lowercase letter. Here is the link: https://medium.com/a-muggles-pensieve/hive-partition-column-name-camelcase-bad-idea-bc203d6e65da