数据表规范格式HQL内部表 外部表都可以
在本地储存位置创建一个bbb.txt文本文件
vi bbb.txt
文件里面添加如下内容
1,lyh,game-swimming-running,guangzhou:tianshoulu-guangzhou:jiaoyulu
2,ljh,game-netplay-watchtv,guangzhou:tianshoulu-guangzhou:zhenxinlu
3,ckw,include-music-sing,foshan:tianshoulu-guangzhou:huangchenglu


启动集群

进入Hive

使用hive1这个数据库

创建t1表
create external table t1(
id int,
name string,
hobby array<string>,
address map<string,string>)
row format delimited fields terminated by ','
collection items terminated by '-'
map keys terminated by ':'
;

导入数据
load data local inpath '/bbb.txt' into table t1;

查看hive里t1表

查看本地bbb.txt表

/***
* ,%%%%%%%%,
* ,%%/\%%%%/\%%
* ,%%%\c "" J/%%%
* %. %%%%/ o o \%%%
* `%%. %%%% _ |%%%
* `%% `%%%%(__Y__)%%'
* // ;%%%%`\-/%%%'
* (( / `%%%%%%%'
* \\ .' |
* \\ / \ | |
* \\/ ) | |
* \ /_ | |__
* (___________))))))) 攻城湿
*/