hive的复杂数据类型

文章目录

  • 4.复杂数据类型
    • 4.1 array
    • 4.2 map
    • 4.3 sturct
    • 4.4 补充:嵌套

4.复杂数据类型

4.1 array

创建

create table if not exists tablename(
id int,name string,news array<string>)
row format delimited fields terminated by ' '
collection items terminated by ',';

查询

select news from tablename;
select news[1

你可能感兴趣的:(Hive,hive,复杂数据类型)