hive建表数组,结构体,map create table test_set(
id INT,
name STRING,
hobby ARRAY<STRING>, //array中元素为String类型
friend MAP<STRING,STRING>, //map中键和值均为String类型hive 字符串转数组
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 的形式.
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论