我是蜂巢新手,在加载空间文件时遇到问题 分隔为数组。 我的源文件:
Manjeet,1 1 1 1 1 5 10 20 10 10 10 20 5 5 10 1 1 1 1 1 5 10 10 10
Ron,1 1 1 1 1 5 10 20 10 10 10 10
Ron,1 1 5 1 10 5 10 20 10 20 1 1 10 10 10
Pat,1 1 1 1 1 5 10 20 10 10 10 10 10 10
我尝试了以下命令:
create table teller
(Name string, Bill array<string>)
Row format delimited
Fields terminated by ','
Collection items terminated by ''
Lines terminated by '\n'
Stored as textfile
location '/user/training/hive/Bank';
我明白了:
Manjeet ["1 1 1 1 1 5 10 20 10 10 10 20 5 5 10 1 1 1 1 1 5 10 10 10"]
Ron ["1 1 1 1 1 5 10 20 10 10 10 10"]
Ron ["1 1 5 1 10 5 10 20 10 20 1 1 10 10 10"]
Pat ["1 1 1 1 1 5 10 20 10 10 10 10 10 10"]
我希望结果像
Manjeet ["1","1","1","1","1", "5"} and so on...