kylin-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 高扬02 <gaoyan...@bianfeng.com>
Subject cube关联后的distinct问题
Date Thu, 25 Oct 2018 07:10:19 GMT
请教各位:

我需要关联两个fact表,所以目前是分别构建两个cube,要关联的字段为user_id,我将它设置同时为dimension和measure,以便可以取得明细(dimension)和计算count_distinct(measure),且不用开启query-push-down
但两个子查询分别命中了对应的cuboid,可是最外层去重查询报错,未知原因?

sql如下:
select count(distinct a.r_id) from
(select r.user_id as r_id,l.user_id as l_id from
(select user_id from register where data_day='2018-09-01' and app_id='403_20170811' )r
inner join
(select user_id from login where data_day='2018-09-01' and app_id='403_20170811')l
on l.user_id=r.user_id
)a;

报错:
Can't create EnumerableAggregate! while executing SQL: "select count(distinct a.r_bmid) from
(select r.bmid_user as r_bmid,l.bmid_user as l_bmid from (select bmid_user from wl_register_bm_mes
where data_day='2018-09-01' and app_id='403_20170811' )r inner join (select bmid_user from
wl_login_new_mes where data_day='2018-10-14' and app_id='403_20170811')l on l.bmid_user=r.bmid_user
)a LIMIT 50000"

期待解答。thx!
Mime
View raw message