Yes! It works.. thanks a lot... 2015-09-02 9:03 GMT+08:00 Shi, Shaofeng <[email protected]>:
> Create a hive view over your fact table, in the view adding column for > date, hour, etc; Then use the view as fact table in Kylin cube; This is a > common practice in Kylin, it will give user the flexibility and with minor > effort; > > On 9/1/15, 5:07 PM, "yu feng" <[email protected]> wrote: > > >Hi all : > > I have use kylin for about one month,but can not find how to generate > >time hierarchy based on my timestamp column, I have an HIVE table like > >this: > > > >CREATE TABLE `sales_table`( > > `time` timestamp, > > `sales` int) > > > >and I have a timestamp column named time, I want to get result like this : > > > >select date(time) ,hour(time),sum(sales) from sales_table group by > >date(time), hour(time); > > > >2015-08-27 16 18388 > >2015-08-27 17 35301 > >2015-08-27 18 41884 > >2015-08-27 19 40638 > >2015-08-27 20 40294 > >2015-08-27 21 43753 > > > >i.e. you can generate full time hierachy like year/month/day/hour.. when > >you have a timestamp column. > > > >I have no idea how to achieve it with kylin and I will appreciate it very > >much if someone can help me,Thanks~~ > >
