You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kylin.apache.org by Yuxiang Mai <yu...@gmail.com> on 2017/09/06 09:51:11 UTC

Query across different MODEL/CUBES

Hi,all

We have some questions about query across different model/cubes.  We know
that kylin will evaluate the cost and select the best cube to query. In our
usage, this worked very good. But if we add more models with filter, the
problem comes.

Here is our scenario, 2 model comes from the same fact table: table_A.

Model test1 without any filter.
cube1 with dimension A,B,C,D,E

Model test1 with filter xxx = yyy.
cube2 with dimension A


If we query select count(1) from table_A; Kylin engine will route the query
to cube2. But our target will be cube1.

I wonder if we can specify the model when we make the query? Because if
someone by mistake create a cube with overlaping
 dimension in a new model with filter conditions. It will impact others.
In our usage, we temporarily limit only 1 model for 1 project.

So, im sum, my question is:
I wonder if we can specify the model when we make the query?


Thanks.


-- 
Yuxiang Mai

Re: Query across different MODEL/CUBES

Posted by Li Yang <li...@apache.org>.
There is no way to specify model/cube now. But as a workaround, you can put
different model in different project and select project.

On Thu, Sep 7, 2017 at 9:46 AM, Yuxiang Mai <yu...@gmail.com> wrote:

> Hi, Billy
> HINT? Errrr....Can you help to more specify?
>
> And seems it should be 1 fact table for 1 model? Although it's not
> mandatory. Because Kylin is a Start model for OLAP, we ask modeler not to
> overlap fact table across models. Is this true & recommended?
>
> Thanks for your reply.
>
> BR//MYX
>
> On Thu, Sep 7, 2017 at 9:27 AM, Billy Liu <bi...@apache.org> wrote:
>
>> It sounds like a HINT in SQL.
>>
>> 2017-09-06 17:51 GMT+08:00 Yuxiang Mai <yu...@gmail.com>:
>>
>>> Hi,all
>>>
>>> We have some questions about query across different model/cubes.  We
>>> know that kylin will evaluate the cost and select the best cube to
>>> query. In our usage, this worked very good. But if we add more models with
>>> filter, the problem comes.
>>>
>>> Here is our scenario, 2 model comes from the same fact table: table_A.
>>>
>>> Model test1 without any filter.
>>> cube1 with dimension A,B,C,D,E
>>>
>>> Model test1 with filter xxx = yyy.
>>> cube2 with dimension A
>>>
>>>
>>> If we query select count(1) from table_A; Kylin engine will route the
>>> query to cube2. But our target will be cube1.
>>>
>>> I wonder if we can specify the model when we make the query? Because if
>>> someone by mistake create a cube with overlaping
>>>  dimension in a new model with filter conditions. It will impact others.
>>> In our usage, we temporarily limit only 1 model for 1 project.
>>>
>>> So, im sum, my question is:
>>> I wonder if we can specify the model when we make the query?
>>>
>>>
>>> Thanks.
>>>
>>>
>>> --
>>> Yuxiang Mai
>>>
>>>
>>
>
>
> --
> Yuxiang Mai
> Sun Yat-Sen Unitversity
> State Key Lab of Optoelectronic
> Materials and Technologies
>

Re: Query across different MODEL/CUBES

Posted by Yuxiang Mai <yu...@gmail.com>.
Hi, Billy
HINT? Errrr....Can you help to more specify?

And seems it should be 1 fact table for 1 model? Although it's not
mandatory. Because Kylin is a Start model for OLAP, we ask modeler not to
overlap fact table across models. Is this true & recommended?

Thanks for your reply.

BR//MYX

On Thu, Sep 7, 2017 at 9:27 AM, Billy Liu <bi...@apache.org> wrote:

> It sounds like a HINT in SQL.
>
> 2017-09-06 17:51 GMT+08:00 Yuxiang Mai <yu...@gmail.com>:
>
>> Hi,all
>>
>> We have some questions about query across different model/cubes.  We know
>> that kylin will evaluate the cost and select the best cube to query. In
>> our usage, this worked very good. But if we add more models with filter,
>> the problem comes.
>>
>> Here is our scenario, 2 model comes from the same fact table: table_A.
>>
>> Model test1 without any filter.
>> cube1 with dimension A,B,C,D,E
>>
>> Model test1 with filter xxx = yyy.
>> cube2 with dimension A
>>
>>
>> If we query select count(1) from table_A; Kylin engine will route the
>> query to cube2. But our target will be cube1.
>>
>> I wonder if we can specify the model when we make the query? Because if
>> someone by mistake create a cube with overlaping
>>  dimension in a new model with filter conditions. It will impact others.
>> In our usage, we temporarily limit only 1 model for 1 project.
>>
>> So, im sum, my question is:
>> I wonder if we can specify the model when we make the query?
>>
>>
>> Thanks.
>>
>>
>> --
>> Yuxiang Mai
>>
>>
>


-- 
Yuxiang Mai
Sun Yat-Sen Unitversity
State Key Lab of Optoelectronic
Materials and Technologies

Re: Query across different MODEL/CUBES

Posted by Billy Liu <bi...@apache.org>.
It sounds like a HINT in SQL.

2017-09-06 17:51 GMT+08:00 Yuxiang Mai <yu...@gmail.com>:

> Hi,all
>
> We have some questions about query across different model/cubes.  We know
> that kylin will evaluate the cost and select the best cube to query. In
> our usage, this worked very good. But if we add more models with filter,
> the problem comes.
>
> Here is our scenario, 2 model comes from the same fact table: table_A.
>
> Model test1 without any filter.
> cube1 with dimension A,B,C,D,E
>
> Model test1 with filter xxx = yyy.
> cube2 with dimension A
>
>
> If we query select count(1) from table_A; Kylin engine will route the
> query to cube2. But our target will be cube1.
>
> I wonder if we can specify the model when we make the query? Because if
> someone by mistake create a cube with overlaping
>  dimension in a new model with filter conditions. It will impact others.
> In our usage, we temporarily limit only 1 model for 1 project.
>
> So, im sum, my question is:
> I wonder if we can specify the model when we make the query?
>
>
> Thanks.
>
>
> --
> Yuxiang Mai
>
>