Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Hive 基于蜂巢大小的过滤器_Hive_Hiveql - Fatal编程技术网

Hive 基于蜂巢大小的过滤器

Hive 基于蜂巢大小的过滤器,hive,hiveql,Hive,Hiveql,我想根据大小筛选hive中的记录,如何实现这一点? 请帮忙 质疑 由于要使用具有大小值的ps字段,请将查询用作子查询,然后使用带有ps字段的where子句仅筛选匹配的行 hive> Select * from ( SELECT t1.member_id, t2.first_name, t2.date_of_birth_sk, COLLECT_LIST(t3.measure_title) as all_measure_desc, size( COLL

我想根据大小筛选hive中的记录,如何实现这一点? 请帮忙

质疑

由于要使用具有大小值的ps字段,请将查询用作子查询,然后使用带有ps字段的where子句仅筛选匹配的行

hive> Select * from (
SELECT 
    t1.member_id,
    t2.first_name,
    t2.date_of_birth_sk,
    COLLECT_LIST(t3.measure_title) as all_measure_desc,
    size( COLLECT_LIST(t3.measure_title)) as ps
FROM qms_gic_lifecycle t1 
INNER JOIN dim_member t2 
on t1.member_id = t2.member_id
INNER JOIN dim_quality_measure t3 
on t1.quality_measure_id = t3.quality_measure_id
where t1.status <> 'closed'

GROUP BY  
    t1.member_id,
    t2.first_name,
    t2.date_of_birth_sk) s 
    where s.ps >= <size_value>;
hive> Select * from (
SELECT 
    t1.member_id,
    t2.first_name,
    t2.date_of_birth_sk,
    COLLECT_LIST(t3.measure_title) as all_measure_desc,
    size( COLLECT_LIST(t3.measure_title)) as ps
FROM qms_gic_lifecycle t1 
INNER JOIN dim_member t2 
on t1.member_id = t2.member_id
INNER JOIN dim_quality_measure t3 
on t1.quality_measure_id = t3.quality_measure_id
where t1.status <> 'closed'

GROUP BY  
    t1.member_id,
    t2.first_name,
    t2.date_of_birth_sk) s 
    where s.ps >= <size_value>;