将数据加载到配置单元表

2wnc66cl  于 2021-06-26  发布在  Hive
关注(0)|答案(2)|浏览(350)

我的数据格式是:

1::Toy Story (1995)::Animation|Children's|Comedy

当我尝试将数据加载到配置单元时,第3列正在从文件中读取数据。
我创建了如下表:

hive> create table movies(mid int,mname string,gn string)
row format delimited
fields terminated by '::'
lines terminated by '\n'
stored as TEXTFILE;
4ngedf3f

4ngedf3f1#

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;

现在可以加载数据集了。

rjee0c15

rjee0c152#

如果表不读取数据,请尝试使用相关的unicode“::”更改字段分隔符。

相关问题