You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by 凡梦星尘 <el...@gmail.com> on 2016/03/01 02:56:31 UTC

Re: Is the Kylin query support custom format?

@Khakhkhar
Thanks, it's not my wish.

@Hongbin,

I don't think the extract functions way is good, maybe I can wait the Kylin
2.x release. Or think how to store this column value type. Is there Kylin
query SQL syntax seems like hive query?

Thanks.

Senhui.Lee

2016-02-29 10:58 GMT+08:00 hongbin ma <ma...@apache.org>:

> you can use extract functions on ts like tableau did
>
> however you need to notice that a ts dimension may has really high
> cardinality (if you didn't do normalization), thus the cube expansion rate
> can be huge and performance can be poor.
>
> On Mon, Feb 29, 2016 at 10:31 AM, 凡梦星尘 <el...@gmail.com> wrote:
>
> > Hi Luke,
> >
> > yeah, the query SQL like below:
> >
> > SELECT ts, c, os, count(hid) hids FROM tableName GROUP BY ts, c, os LIMIT
> > 50;
> >
> > The ts default format is 'yyyy-MM-dd HH:mm:ss.S', but I want the result
> > group by hours very day, Is there had other way to come true?
> >
> > Thanks.
> >
> > Senhui.Lee
> >
> > 2016-02-28 17:22 GMT+08:00 Luke Han <lu...@gmail.com>:
> >
> > > Hi Senhui,
> > >     Would you mind to give us one sample SQL for your requirement?
> > >
> > >     Kylin 1.x does not support timestamp yet, but Kylin 2 will support.
> > >
> > >     Thanks.
> > > Luke
> > >
> > >
> > > Best Regards!
> > > ---------------------
> > >
> > > Luke Han
> > >
> > > On Fri, Feb 26, 2016 at 6:02 PM, 凡梦星尘 <el...@gmail.com> wrote:
> > >
> > > > Hi guys.
> > > >
> > > > Today I had integration the Kylin 1.3-SNAPSHOT version, then create a
> > > > simple project and cube. the query result include the timestamp
> value.
> > > Also
> > > > I want to format the value in hours then group by it. Is the Kylin
> > > support
> > > > it?
> > > >
> > > > Thanks.
> > > >
> > > > Senhui.Lee
> > > >
> > >
> >
>
>
>
> --
> Regards,
>
> *Bin Mahone | 马洪宾*
> Apache Kylin: http://kylin.io
> Github: https://github.com/binmahone
>

Re: Is the Kylin query support custom format?

Posted by hongbin ma <ma...@apache.org>.
Kylin provides ANSI sql interface. dialects in hive sql may not exist in
ANSI sql.
currently you can use a hive view to convert your timestamp column to other
types (like string or date), and import the view as fact table for your
cube. many customers adopt this way

On Tue, Mar 1, 2016 at 9:56 AM, 凡梦星尘 <el...@gmail.com> wrote:

> @Khakhkhar
> Thanks, it's not my wish.
>
> @Hongbin,
>
> I don't think the extract functions way is good, maybe I can wait the Kylin
> 2.x release. Or think how to store this column value type. Is there Kylin
> query SQL syntax seems like hive query?
>
> Thanks.
>
> Senhui.Lee
>
> 2016-02-29 10:58 GMT+08:00 hongbin ma <ma...@apache.org>:
>
> > you can use extract functions on ts like tableau did
> >
> > however you need to notice that a ts dimension may has really high
> > cardinality (if you didn't do normalization), thus the cube expansion
> rate
> > can be huge and performance can be poor.
> >
> > On Mon, Feb 29, 2016 at 10:31 AM, 凡梦星尘 <el...@gmail.com> wrote:
> >
> > > Hi Luke,
> > >
> > > yeah, the query SQL like below:
> > >
> > > SELECT ts, c, os, count(hid) hids FROM tableName GROUP BY ts, c, os
> LIMIT
> > > 50;
> > >
> > > The ts default format is 'yyyy-MM-dd HH:mm:ss.S', but I want the result
> > > group by hours very day, Is there had other way to come true?
> > >
> > > Thanks.
> > >
> > > Senhui.Lee
> > >
> > > 2016-02-28 17:22 GMT+08:00 Luke Han <lu...@gmail.com>:
> > >
> > > > Hi Senhui,
> > > >     Would you mind to give us one sample SQL for your requirement?
> > > >
> > > >     Kylin 1.x does not support timestamp yet, but Kylin 2 will
> support.
> > > >
> > > >     Thanks.
> > > > Luke
> > > >
> > > >
> > > > Best Regards!
> > > > ---------------------
> > > >
> > > > Luke Han
> > > >
> > > > On Fri, Feb 26, 2016 at 6:02 PM, 凡梦星尘 <el...@gmail.com> wrote:
> > > >
> > > > > Hi guys.
> > > > >
> > > > > Today I had integration the Kylin 1.3-SNAPSHOT version, then
> create a
> > > > > simple project and cube. the query result include the timestamp
> > value.
> > > > Also
> > > > > I want to format the value in hours then group by it. Is the Kylin
> > > > support
> > > > > it?
> > > > >
> > > > > Thanks.
> > > > >
> > > > > Senhui.Lee
> > > > >
> > > >
> > >
> >
> >
> >
> > --
> > Regards,
> >
> > *Bin Mahone | 马洪宾*
> > Apache Kylin: http://kylin.io
> > Github: https://github.com/binmahone
> >
>



-- 
Regards,

*Bin Mahone | 马洪宾*
Apache Kylin: http://kylin.io
Github: https://github.com/binmahone