kylin-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ShaoFeng Shi <shaofeng...@apache.org>
Subject Re: if can add where clause to a measure?
Date Wed, 21 Dec 2016 09:55:30 GMT
Kylin can do this (by defining "price" as dimension) but the cube explosion
rate might be high since "price"'s cardinality is high;

Usually when face such a scenario we can optimize it in this way:

1. define a hive view, adding another column say "price_grade"; normalizing
the price values into grade, say 100, 200, etc (depends on the need);

2. using the new view as cube's fact table, adding "price_grade" as a
dimension, and defining "sum(price)" as measure;

3. query using the new added column as the filtering condition.

2016-12-21 15:30 GMT+08:00 Alberto Ramón <a.ramonportoles@gmail.com>:

> I never use, but Kylin 976
> <https://issues.apache.org/jira/browse/KYLIN-976> can be useful for you
>
>
> 2016-12-21 8:14 GMT+01:00 ZhouJie <zhoujie338@126.com>:
>
>> hi, everyone
>> i want to know if kylin can filter a column which has been measured, as
>> follows:
>> select sum(price) from hotprice_copy1 where price > 100.0 and price
>> <5000.0
>>
>> thanks
>> joe
>>
>
>


-- 
Best regards,

Shaofeng Shi 史少锋

Mime
View raw message