You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by Abhilash L L <ab...@infoworks.io> on 2015/07/06 11:09:21 UTC

Example of hierarchical dimension

Hello,

   I was trying to understand hierarchical dimension usage.

Lets say I have a fact table F with the structure,

F
   c1
   c2
   c3
   c4

And a hierarchical dimension H with the structure,
H
    h1,
    h2,
    h3,

The actual order is h2 > h3.
The join key is F.c4 = H.h1.

I saw that, since h2,h3 form a hierarchical dimension, they become part of
row key..  so rowkey here is h2, h3 only. (This would help point / range
look ups)


In Kylin UI, when I try to fire a query,

select  ...
from F
join H on F.c4 = H.h1

I get an error saying F.c4 not found.

What should a query look like which I can enter in Kylin UI as the above
query is not being accepted.

Should the join key (in this case c4/h1) be part of the hierarchy as
h1>h2>h3 instead of only h2>h3?

Regards,
Abhilash

Re: Example of hierarchical dimension

Posted by Li Yang <li...@apache.org>.
We should create an example to demonstrate how to use the hierarchy/derived
and other concepts in action.

Created JIRA https://issues.apache.org/jira/browse/KYLIN-887


On Thu, Jul 9, 2015 at 8:08 PM, Luke Han <lu...@gmail.com> wrote:

> Could you please try 0.7-staging branch (v0.7.2-snapshot)?
> You can generate binary page or download from our site:
> http://kylin.incubator.apache.org/download/
> <http://kylin.incubator.apache.org/download/>
>
> Thanks.
>
>
> Best Regards!
> ---------------------
>
> Luke Han
>
> On Thu, Jul 9, 2015 at 5:51 PM, Abhilash L L <ab...@infoworks.io>
> wrote:
>
> > Hi Luke,
> >
> > We are Kylin 0.7.1-SNAPSHOT
> >
> > Regards,
> > Abhilash
> >
> > On Wed, Jul 8, 2015 at 7:46 PM, Luke Han <lu...@gmail.com> wrote:
> >
> > > Which version you are using? There's bug relative to rowkey and
> > hierarchy.
> > >
> > > Thanks.
> > >
> > >
> > > Best Regards!
> > > ---------------------
> > >
> > > Luke Han
> > >
> > > On Mon, Jul 6, 2015 at 5:09 PM, Abhilash L L <ab...@infoworks.io>
> > > wrote:
> > >
> > > > Hello,
> > > >
> > > >    I was trying to understand hierarchical dimension usage.
> > > >
> > > > Lets say I have a fact table F with the structure,
> > > >
> > > > F
> > > >    c1
> > > >    c2
> > > >    c3
> > > >    c4
> > > >
> > > > And a hierarchical dimension H with the structure,
> > > > H
> > > >     h1,
> > > >     h2,
> > > >     h3,
> > > >
> > > > The actual order is h2 > h3.
> > > > The join key is F.c4 = H.h1.
> > > >
> > > > I saw that, since h2,h3 form a hierarchical dimension, they become
> part
> > > of
> > > > row key..  so rowkey here is h2, h3 only. (This would help point /
> > range
> > > > look ups)
> > > >
> > > >
> > > > In Kylin UI, when I try to fire a query,
> > > >
> > > > select  ...
> > > > from F
> > > > join H on F.c4 = H.h1
> > > >
> > > > I get an error saying F.c4 not found.
> > > >
> > > > What should a query look like which I can enter in Kylin UI as the
> > above
> > > > query is not being accepted.
> > > >
> > > > Should the join key (in this case c4/h1) be part of the hierarchy as
> > > > h1>h2>h3 instead of only h2>h3?
> > > >
> > > > Regards,
> > > > Abhilash
> > > >
> > >
> >
>

Re: Example of hierarchical dimension

Posted by Luke Han <lu...@gmail.com>.
Could you please try 0.7-staging branch (v0.7.2-snapshot)?
You can generate binary page or download from our site:
http://kylin.incubator.apache.org/download/
<http://kylin.incubator.apache.org/download/>

Thanks.


Best Regards!
---------------------

Luke Han

On Thu, Jul 9, 2015 at 5:51 PM, Abhilash L L <ab...@infoworks.io> wrote:

> Hi Luke,
>
> We are Kylin 0.7.1-SNAPSHOT
>
> Regards,
> Abhilash
>
> On Wed, Jul 8, 2015 at 7:46 PM, Luke Han <lu...@gmail.com> wrote:
>
> > Which version you are using? There's bug relative to rowkey and
> hierarchy.
> >
> > Thanks.
> >
> >
> > Best Regards!
> > ---------------------
> >
> > Luke Han
> >
> > On Mon, Jul 6, 2015 at 5:09 PM, Abhilash L L <ab...@infoworks.io>
> > wrote:
> >
> > > Hello,
> > >
> > >    I was trying to understand hierarchical dimension usage.
> > >
> > > Lets say I have a fact table F with the structure,
> > >
> > > F
> > >    c1
> > >    c2
> > >    c3
> > >    c4
> > >
> > > And a hierarchical dimension H with the structure,
> > > H
> > >     h1,
> > >     h2,
> > >     h3,
> > >
> > > The actual order is h2 > h3.
> > > The join key is F.c4 = H.h1.
> > >
> > > I saw that, since h2,h3 form a hierarchical dimension, they become part
> > of
> > > row key..  so rowkey here is h2, h3 only. (This would help point /
> range
> > > look ups)
> > >
> > >
> > > In Kylin UI, when I try to fire a query,
> > >
> > > select  ...
> > > from F
> > > join H on F.c4 = H.h1
> > >
> > > I get an error saying F.c4 not found.
> > >
> > > What should a query look like which I can enter in Kylin UI as the
> above
> > > query is not being accepted.
> > >
> > > Should the join key (in this case c4/h1) be part of the hierarchy as
> > > h1>h2>h3 instead of only h2>h3?
> > >
> > > Regards,
> > > Abhilash
> > >
> >
>

Re: Example of hierarchical dimension

Posted by Abhilash L L <ab...@infoworks.io>.
Hi Luke,

We are Kylin 0.7.1-SNAPSHOT

Regards,
Abhilash

On Wed, Jul 8, 2015 at 7:46 PM, Luke Han <lu...@gmail.com> wrote:

> Which version you are using? There's bug relative to rowkey and hierarchy.
>
> Thanks.
>
>
> Best Regards!
> ---------------------
>
> Luke Han
>
> On Mon, Jul 6, 2015 at 5:09 PM, Abhilash L L <ab...@infoworks.io>
> wrote:
>
> > Hello,
> >
> >    I was trying to understand hierarchical dimension usage.
> >
> > Lets say I have a fact table F with the structure,
> >
> > F
> >    c1
> >    c2
> >    c3
> >    c4
> >
> > And a hierarchical dimension H with the structure,
> > H
> >     h1,
> >     h2,
> >     h3,
> >
> > The actual order is h2 > h3.
> > The join key is F.c4 = H.h1.
> >
> > I saw that, since h2,h3 form a hierarchical dimension, they become part
> of
> > row key..  so rowkey here is h2, h3 only. (This would help point / range
> > look ups)
> >
> >
> > In Kylin UI, when I try to fire a query,
> >
> > select  ...
> > from F
> > join H on F.c4 = H.h1
> >
> > I get an error saying F.c4 not found.
> >
> > What should a query look like which I can enter in Kylin UI as the above
> > query is not being accepted.
> >
> > Should the join key (in this case c4/h1) be part of the hierarchy as
> > h1>h2>h3 instead of only h2>h3?
> >
> > Regards,
> > Abhilash
> >
>

Re: Example of hierarchical dimension

Posted by Luke Han <lu...@gmail.com>.
Which version you are using? There's bug relative to rowkey and hierarchy.

Thanks.


Best Regards!
---------------------

Luke Han

On Mon, Jul 6, 2015 at 5:09 PM, Abhilash L L <ab...@infoworks.io> wrote:

> Hello,
>
>    I was trying to understand hierarchical dimension usage.
>
> Lets say I have a fact table F with the structure,
>
> F
>    c1
>    c2
>    c3
>    c4
>
> And a hierarchical dimension H with the structure,
> H
>     h1,
>     h2,
>     h3,
>
> The actual order is h2 > h3.
> The join key is F.c4 = H.h1.
>
> I saw that, since h2,h3 form a hierarchical dimension, they become part of
> row key..  so rowkey here is h2, h3 only. (This would help point / range
> look ups)
>
>
> In Kylin UI, when I try to fire a query,
>
> select  ...
> from F
> join H on F.c4 = H.h1
>
> I get an error saying F.c4 not found.
>
> What should a query look like which I can enter in Kylin UI as the above
> query is not being accepted.
>
> Should the join key (in this case c4/h1) be part of the hierarchy as
> h1>h2>h3 instead of only h2>h3?
>
> Regards,
> Abhilash
>