我創建了一個蜂巢表查詢 -蜂箱 - 分區表
create table studpart4(id int, name string) partitioned by (course string, year int) row format delimited fields terminated by '\t' lines terminated by '\n' stored as textfile;
創建成功。
下面的命令加載的數據 -
load data local inpath '/scratch/hive_inputs/student_input_1.txt' overwrite into table studpart4 partition(course='cse',year=2);
我的輸入數據文件的樣子 -
101 student1 cse 1
102 student2 cse 2
103 student3 eee 3
104 student4 eee 4
105 student5 cse 1
106 student6 cse 2
107 student7 eee 3
108 student8 eee 4
109 student9 cse 1
110 student10 cse 2
但是輸出顯示爲(的select * from studpart4
) -
101 student1 cse 2
102 student2 cse 2
103 student3 eee 2
104 student4 eee 2
105 student5 cse 2
106 student6 cse 2
107 student7 eee 2
108 student8 eee 2
109 student9 cse 2
110 student10 cse 2
爲什麼最後一列是2.爲什麼它被改變和更新錯誤。
http://stackoverflow.com/a/13224581/2079249 –