首先我创建一个蜂巢分区表:插入到蜂巢分区表错误
hive> create table partition_table
> (sid int ,sname string ,age int)
> partitioned by (sex string)
> row format delimited fields terminated by',';
OK
Time taken: 1.232 seconds
下表说明在下面给出:
hive> desc partition_table;
OK
sid int
sname string
age int
sex string
# Partition Information
# col_name data_type comment
sex string
Time taken: 0.34 seconds, Fetched: 9 row(s)
,然后我插入一些数据到这个表,但它不没有工作。
hive> insert into table partition_table partition(sex='M')select sno ,sname ,age from student1 where sex ='M';
FAILED: SemanticException [Error 10006]: Line 1:44 Partition not found ''M''
为了避免这一点,我写了下面的命令,然后执行我的插入命令,即使在当时我反复得到同样的错误。
set exec.dynamic.partition=true;
set exec.dynamic.partition.mode=nonstrict;
请指导我。在此先感谢
你可以添加'select sno,sname,来自student1的年龄,其中sex ='M''输出到问题。查询没有问题。 – syadav
当然..分区列是否必须是英文 –