当前位置:首页 > 开发 > 编程语言 > 大数据 > 正文

hive having count 不能去重

发表于: 2015-07-03   作者:daizj   来源:转载   浏览:
摘要: hive在使用having count()是,不支持去重计数   hive (default)> select imei from t_test_phonenum where ds=20150701 group by imei having count(distinct phone_num)>1 limit 10;  FAILED: SemanticExcep

hive在使用having count()是,不支持去重计数

 

hive (default)> select imei from t_test_phonenum where ds=20150701 group by imei having count(distinct phone_num)>1 limit 10; 

FAILED: SemanticException [Error 10002]: Line 1:95 Invalid column reference 'phone_num'

 

hive (default)> select imei from t_test_phonenum where ds=20150701 group by imei having count(phone_num)>1 limit 10;          

Total MapReduce jobs = 1

Launching Job 1 out of 1

Number of reduce tasks not specified. Estimated from input data size: 1

In order to change the average load for a reducer (in bytes):

  set hive.exec.reducers.bytes.per.reducer=<number>

In order to limit the maximum number of reducers:

  set hive.exec.reducers.max=<number>

In order to set a constant number of reducers:

  set mapred.reduce.tasks=<number>

Starting Job = job_201503201830_2570778, Tracking URL = http://10-198-131-242:8080/jobdetails.jsp?jobid=job_201503201830_2570778

Kill Command = /data/home/hadoop-1.2.1/libexec/../bin/hadoop job  -kill job_201503201830_2570778

Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 1

2015-07-03 11:07:16,954 Stage-1 map = 0%,  reduce = 0%

2015-07-03 11:07:33,530 Stage-1 map = 100%,  reduce = 0%

2015-07-03 11:07:47,620 Stage-1 map = 100%,  reduce = 33%, Cumulative CPU 14.32 sec

2015-07-03 11:07:55,742 Stage-1 map = 100%,  reduce = 100%, Cumulative CPU 20.78 sec

MapReduce Total cumulative CPU time: 20 seconds 780 msec

Ended Job = job_201503201830_2570778

MapReduce Jobs Launched: 

Job 0: Map: 1  Reduce: 1   Cumulative CPU: 20.78 sec   HDFS Read: 17371199 HDFS Write: 98 SUCCESS

Total MapReduce CPU Time Spent: 20 seconds 780 msec

OK

02541213XXXXX

 

特此记录一下

 

hive having count 不能去重

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

我来说两句
评论内容:
验  证  码:
 
(网友评论仅供其表达个人看法,并不表明本站同意其观点或证实其描述。)
评论列表
已有 0 条评论(查看更多评论)
版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号