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 的形式.