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~~

Reply via email to