导出数据:
导出到HDFS:
insert overwriter directory ''
select * form t1
where salary<15000;
导出到本地:
insert overwriter local directory ''
select * form t1
where salary<15000;
复杂数据类型
create table movie_info(
id int,
name string,
work_city array<string>,
piaofang map<string,int>,
address struct<addr:string,zipcode:bigint,phone:bigint,value:int>
)
row format delimited
fileds terminated by" "
collection items terminated by ","
map keys terminated by ":"
lines terminated by "\n";
load data local inpath'' into table movie_info;