|NO.Z.00010|——————————|BigDataEnd|——|Hadoop&OLAP_Kylin.V10|——|Kylin.v10|Kylin构建Cube|增量构建Cube.V3|

一、定义数据源
### --- 定义数据源

~~~     定义数据源
~~~     加载数据
~~~     查看加载的数据

二、定义model
### --- 定义model

~~~     定义model
~~~     定义分区
三、定义cube
### --- 定义cube

~~~     定义cube
~~~     定义维度
~~~     措施
~~~     Refresh Setting——>后面保持默认
 

四、构造第三个时间段cubecube
### --- 构造第三个时间段cubecube

~~~     # 构造三个时间段cube
~~~     # 选择时间段:
~~~     第一个cube时间段:2021-10-01~2021-10-02
~~~     第二个cube时间段:2021-10-02~2021-10-03
~~~     第三个cube时间段:2021-10-03~2021-10-04
~~~     # 查看构建状态
~~~     # 查看对应的Segment:查看增量构建Cube对应的Segment
 
五、SQL查询
### --- 执行SQL查询语句
### --- SQL查询结果

~~~     # SQL语句一:
select t1.dt,
    t2.regionname,
    sum(t1.price) as total_money,
    sum(t1.amount) as total_amount,
    max(t1.price) as total_money,
    min(t1.amount) as total_amount
from dw_sales1 t1 join dim_region t2 on t1.regionid = t2.regionid group by t1.dt, t2.regionname order by dt
~~~     # SQL语句二:

select
    t1.dt,
    t2.regionid,
    t2.regionname,
    t3.productid,
    t3.productname,
    sum(t1.price) as total_money,
    sum(t1.amount) as total_amount
from dw_sales1 t1 inner join dim_region t2 on t1.regionid = t2.regionid inner join dim_product t3 on t1.productid = t3.productid group by
    t1.dt,
    t2.regionid,
    t2.regionname,
    t3.productid,
    t3.productname
order by
    t1.dt,
    t2.regionname,
    t3.productname

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

 

posted on   yanqi_vip  阅读(14)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示