既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上大数据知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
company_name,--公司名称
province_name,--省份名称
city_name,--城市名称
county_name,--区域名称
customer_classify_name,--客户名称
customer_province_name--客户省份
from dim_oilstation;
```
- dim\_date:时间维度表
```
select
date_id,--天
week_in_year_id,--周
year_month_id --月
from dim_date;
```
- 实现分析
select
a.os_id,--油站id
sum(a.os_num),--油站数量
sum(a.current_new_os_num),--新增油站数量
b.date_id,--天
b.week_in_year_id,--周
b.year_month_id, --月
c.company_name,--公司名称
c.province_name,--省份名称
c.city_name,--城市名称
c.county_name,--区域名称
c.customer_classify_name,--客户名称
c.customer_province_name--客户省份
from fact_oil_station a
join one_make_dws.dim_date b on a.dt = b.date_id
join one_make_dws.dim_oilstation c on a.os_id = c.id
group by
b.date_id,--天
b.week_in_year_id,--周
b.year_month_id, --月
c.company_name,--公司名称
c.province_name,--省份名称
c.city_name,--城市名称
c.county_name,--区域名称
c.customer_classify_name,--客户名称
c.customer_province_name;--客户省份;
-
小结
- 掌握油站主题的需求分析
08:服务域:油站主题实现
-
目标:实现油站主题表的维度指标构建
-
实施
- 建表
-- 创建油站主题表 drop table if exists one_make_st.subj_oilstation; create table if not exists one_make_st.subj_oilstation( sum_osnum bigint comment '油站数量' ,sumnew_osnum int comment '新增油站数量' ,dws_day string comment '日期维度-按天' ,dws_week string comment '日期维度-按周' ,dws_month string comment '日期维度-按月' ,oil_type string comment '油站维度-油站类型' ,oil_province string comment '油站维度-油站所属省' ,oil_city string comment '油站维度-油站所属市' ,oil_county string comment '油站维度-油站所属区' ,customer_classify string comment '客户维度-客户类型' ,customer_province string comment '客户维度-客户所属省' ) comment '油站主题表' partitioned by (month String, week String, day String) stored as orc location '/data/dw/st/one\_make/subj\_oilstation';
- 构建
insert overwrite table one_make_st.subj_oilstation partition(month = '202101', week='2021W1', day='20210101') select sum(oil.os_num) sum_osnum, --油站数量 sum(oil.current_new_os_num) sumnew_osnum, --新增油站数量 dd.date_id dws_day, --日期天 dd.week_in_year_id dws_week, --日期周 dd.year_month_id dws_month, --日期月 dimoil.company_name oil_type, --油站类型 dimoil.province_name oil_province, --油站省份 dimoil.city_name oil_city, --油站城市 dimoil.county_name oil_county, --油站区域 dimoil.customer_classify_name customer_classify, --客户类型 dimoil.customer_province_name customer_province --客户省份 --油站事务事实表
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上大数据知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新**