|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
分类:
bdv023-kylin
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」