首先我創建一個蜂巢分區表:插入到蜂巢分區表錯誤
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
當然..分區列是否必須是英文 –