CC00010.kylin——|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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yanqi_vip

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值