我的数据格式为:
1::Toy Story (1995)::Animation|Children's|Comedy
当我尝试将数据加载到Hive 3rd列时,正在从文件读取。
我按如下方式创建了表:
hive> create table movies(mid int,mname string,gn string)
row format delimited
fields terminated by '::'
lines terminated by '\n'
stored as TEXTFILE;
答案 0 :(得分:0)
hive> create table movies(mid int,mname string,gn array<string>)
row format delimited
fields terminated by '::'
collection items terminated by '|'
lines terminated by '\n'
stored as TEXTFILE;
现在您可以加载数据集了。
答案 1 :(得分:0)
如果表格不读取数据,请尝试使用相关的unicode“::”更改字段分隔符。