Hive DML数据操作
1.数据导入
load data [local] inpath '数据path' [overwrite] into table student [partition (col=x)]
insert overwrite table table_name
select id, name from student where id < 1006
2.数据导出
insert overwrite [local] directory '/xxx/xxx' select * from table_name
insert overwrite local directory '/xxx/xxx'
row format delimited fields terminated by '\t'
select * from table_name
3.查询语句(HiveSql的执行顺序)
from
join on
[lateral views explode(col) tb_name as col_name]
where
group by(可以使用select中的别名了)
聚集函数 count() avg() sum()
having
select
distinct
order by
limit