You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kylin.apache.org by "tchen@uhome24.com" <tc...@uhome24.com> on 2020/11/24 10:06:20 UTC

Return wrong results when i query with derived dimension

Hello everyone:
    Recently, i got wrong results when i execute query on kylin with derived dimension.
The kylin version is 2.6.4.
This is my data model:
But when i execute the below query:

select t1.city, t2.circle, sum(goods_realamt) amt
  from dw.fct_orders_goods_info t1
  left join dw.dim_store_info t2
    on t1.store_code = t2.store_code
 where t1."DAY" = '2020-11-20'
 group by t1.city, t2.circle;

But in the results, the value in the dimension 'circle' is not the real value of the lookup table dw.dim_store_info, but other dimension's value.

Did you have meet this problems and how can i solve this problem?


回复: Re:Return wrong results when i query with derived dimension

Posted by "tchen@uhome24.com" <tc...@uhome24.com>.
Thank you! I have found the reason. Beause I have changed the order of the dimensions a couple days ago。
 
 
发件人: Xiaoxiang Yu
发送时间: 2020-11-24 19:56
收件人: user; tchen
主题: Re:Return wrong results when i query with derived dimension
Could this issue be reproduced by Kylin's sample data(kylin_sales)? If you can show how to reproduce and open a issue for that, kylin maintainer will try to find the cause.
--
Best wishes to you ! 
From :Xiaoxiang Yu

在 2020-11-24 18:06:20,"tchen@uhome24.com" <tc...@uhome24.com> 写道:
Hello everyone:
    Recently, i got wrong results when i execute query on kylin with derived dimension.
The kylin version is 2.6.4.
This is my data model:
But when i execute the below query:

select t1.city, t2.circle, sum(goods_realamt) amt
  from dw.fct_orders_goods_info t1
  left join dw.dim_store_info t2
    on t1.store_code = t2.store_code
 where t1."DAY" = '2020-11-20'
 group by t1.city, t2.circle;

But in the results, the value in the dimension 'circle' is not the real value of the lookup table dw.dim_store_info, but other dimension's value.

Did you have meet this problems and how can i solve this problem?


Re:Return wrong results when i query with derived dimension

Posted by Xiaoxiang Yu <xx...@apache.org>.
Could this issue be reproduced by Kylin's sample data(kylin_sales)? If you can show how to reproduce and open a issue for that, kylin maintainer will try to find the cause.

--

Best wishes to you ! 
From :Xiaoxiang Yu




在 2020-11-24 18:06:20,"tchen@uhome24.com" <tc...@uhome24.com> 写道:

Hello everyone:
    Recently, i got wrong results when i execute query on kylin with derived dimension.
The kylin version is 2.6.4.
This is my data model:
But when i execute the below query:


select t1.city, t2.circle, sum(goods_realamt) amt
  from dw.fct_orders_goods_info t1
  left join dw.dim_store_info t2
    on t1.store_code = t2.store_code
 where t1."DAY" = '2020-11-20'
 group by t1.city, t2.circle;


But in the results, the value in the dimension 'circle' is not the real value of the lookup table dw.dim_store_info, but other dimension's value.


Did you have meet this problems and how can i solve this problem?