hive
共 4 篇文章
HIVE数据操作语言DML
1.hive的集中join方式和使用场景,map-side join的reduce-side join适用场景 2.复杂查询的单标过滤条件使用位置,where和on的区别,涉及列裁剪,分区裁剪; 列裁剪优化: select * from order_table limit 10;优化后只读取需要的数据列 select user,item from order_table limit 10; 分区裁剪优化使用查询条件添加分区: select count(orderid) form order_table where[i] dt='2014-11-11' [/i]and to_data(sale…
2017-08-08 21:15 · hive
hive学习使用
HQL数据查询 数据查询是hive最主要的功能 查询语法 select..from语句 基本和mysql的操作差不多 select col1,col2 from table; select col1 c1,col2 c2 from table; select l.name,r.cousrse from (select id,name from student) l join (select id,course from student_info) r on l.id=r.id; select * from student limit 100; 如果需要在select语句中根据某列的值进行相应…
2016-10-11 17:36 · hive · hive
hive研究学习整理
[b]hive的认识[/b] hive的设计目的是为了让那些精通sql技能的而java技能较弱的数据分析师能够利用hadoop进行各做数据分析。也就是mapreduce不需要每个都写java代码了,hive可以将用户输入的hiveQl脚本转化为一个或多个MapReduce作业在集群上运行。【pig和hive类似,只是不同的是pig使用的是pig latin语言接口提供,更加灵活学习成本高】, [b]hive与关系型数据库的区别[/b] 数据存储位置:hive是基于hadoop的,所以hive都在hdfs上存放,而数据库可以将数据保存在块设备或本地文件系统中 数据格式:对于hive的数据格式,…
2016-10-11 10:21 · hive · hive
hive使用load加载数据1.0
安装hive 直接操作hive create table if not exists L_EMPLOYEE (eid int,name String,salary String,destination String) COMMENT 'Employee details' ROW FORMAT delimited fields terminated by '\t' lines terminated by '\n' stored as textfile; 加载数据到数据表中, load data local inpath '/data/app/lijianzhen/hive/l_employee…