Hi, kylin is a OLAP engine, it support star schema and snowflake schema. Both 
star schema and snowflake schema support only one fact table. If these two 
tables cannnot be found in one model, it cannot be executed on kylin.
As FAQ says [http://kylin.apache.org/docs/gettingstarted/faq.html]


Is Kylin a generic SQL engine for big data?

  *   No, Kylin is an OLAP engine with SQL interface. The SQL queries need be 
matched with the pre-defined OLAP model.


----------------
Xiaoxiang Yu


发件人: 高扬02 <[email protected]>
答复: "[email protected]" <[email protected]>
日期: 2018年10月25日 星期四 15:10
收件人: "[email protected]" <[email protected]>
主题: cube关联后的distinct问题

请教各位:

我需要关联两个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!

Reply via email to