hive 建表 数组,结构体, map

create table test_set(
id INT,
name STRING,
hobby ARRAY<STRING>,    //array中元素为String类型
friend MAP<STRING,STRING>,    //map中键和值均为String类型
mark struct<math:int,english:int>   //Struct中元素为Int类型
)
row format delimited fields terminated by ','   //字段之间用','分隔
collection items terminated by '_'     //集合中的元素用'_'分隔
map keys terminated by ':'      //map中键值对之间用':'分隔
lines terminated by '\n       //行之间用'\n'分隔
 

以上是 在数组中插入结构体  map  以及  key:value 的形式.

posted @ 2020-07-05 23:12  挪威森林猫Zzz  阅读(2611)  评论(1编辑  收藏  举报