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 '
       //行之间用'
'分隔
 

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

原文地址:https://www.cnblogs.com/alpha-cat/p/13252440.html