大数据-hadoop-Hive基本操作-DML连载之06(2019-06-03)

关于大数据学习的最好的网站就是官网http://www.apache.org/  

参考资料:http://www.apache.org/ 

免责声明:很多资料都是网上一步步搜集到的,感谢各位前辈默默无闻的奉献与付出,资料过多,不一一感谢,如果侵权,请及时联系作者本人或者投诉至平台,我会第一时间删除,纯分享。

DML: database manager language  数据库管理语言  说白了就是表操作 DDL是对数据库进行操作

将hive中的数据导出到文件中(HDFS或者linux本地文件系统中)

select 表  insert into overwrite 

limit 选项的作用 

对数据库表的 增删改查

查询语句

select * from emp ;

select name ,id from emp;

聚合函数:

多行数据操作,并取其中的一行出来

sum count max min 。。。

select count(1) from emp ;

分组函数 ; 非常重要

group by 

group by 有一个非常重要的语法: 即在select的查询语句中,要么是是group by 的选项,要么出现在聚合函数中:

例如一个表student的结构有 id name sex salary dapartnumber 

select  dapartnumber  ,avg(salary) from student group by dapartnumber;

语句的意思就是查询dapartnumber 中 salary的平均数是多少,dapartnumber  在group by 中有出现,salary 在聚合函数中 

export &import 

分区表:&&&&重要

动态分区与静态分区

partiton (key-value)

猜你喜欢

转载自blog.csdn.net/weixin_38638777/article/details/90761458