hive分区表插入报错
In Hive the partitioning "columns" are managed as metadata >> they are not included in the data files, instead they are used as sub-directory names. So your partitioned table has just 2 real columns, and you must feed just 2 columns with your SELECT.
解决办法如下:
你应该:insert into table part partition(sex='M') select id,name from non_part where sex='M';(对,你要插入的就是两列,分区列不作为数据保存在数据表中)
而不是:insert into table part partition(sex='M') select * from non_part where sex='M';
hive分区表查询
FAILED: SemanticException [Error 10041]: No partition predicate found for Alias "table" Table "table" select * from table where d="2019-07-14"
其中d表示分区字段
hive创建分区表<