当前位置:网站首页>数仓模型事实表模型设计
数仓模型事实表模型设计
2022-07-02 06:24:00 【Ayub】
事实表:数据明细层,将ODS层的数据,进行ETL后,轻度聚合 ,展开明细! 然后存入DWD层。
1、在展开明细时,对部分维度进行扩充。如增加位置信息,主要是扩展维度信息。
2、参考星型模型的建模策略,对业务过程,粒度,维度,事实。使用3W的原则。
who:谁做的
where:在哪里做的
what:做的什么
事实表的类型:
在设计事实表的时候,其实有多种不同类型,当然每个公司设计方式不一样。我们在设计的时候就包含3种。
1. 事务型事实表: 数据仓库中的数据保持唯一性。数据在事务事件发生后产生,数据的粒度通常是每个事务记录一条记录。一旦事务被提交,事实表数据被插入,数据就不再进行更改,其更新方式为增量更新。这事实表我们处理我们就只关注增量处理。
2.快照型事实表:将昨日分区的全量数据关联细的维度。(默认ODS按天分区全量数据)
3.累积型事实表: 这种事实表,通常是一个事务只有一个主键,事务的修改都是在原来的数据上修改。这种事实表的处理。虽然我们也可以增量处理,但是就是需要动态分区覆盖历史的分区,以达到事务主键唯一。
订单明细表---事务型快照事实表(ODS昨天全量join)
支付事实表---事务型快照事实表
退款事实表---事务型快照事实表
评价事实快---事务型快照事实表,采用3W原则
事务型事实表
购物车事实表---周期性快照事实表,全量同步,所以一般只保留7天
优惠券事实表---累积型快照事实表,按统计事实的起始时间作为分区字段。相同的覆盖。
边栏推荐
- flex九宫格布局
- Automation - when Jenkins pipline executes the nodejs command, it prompts node: command not found
- Common function writing method and set get writing method for calculating attributes
- Fe - wechat applet - Bluetooth ble development research and use
- php中通过集合collect的方法来实现把某个值插入到数组中指定的位置
- php中根据数字月份返回月份的英文缩写
- sqli-labs通關匯總-page2
- SQLI-LABS通关(less2-less5)
- (the 100th blog) written at the end of the second year of doctor's degree -20200818
- [leetcode question brushing day 35] 1060 Missing element in ordered array, 1901 Find the peak element, 1380 Lucky number in matrix
猜你喜欢
Ingress Controller 0.47.0的Yaml文件
Stack (linear structure)
Sqli Labs clearance summary - page 2
Sqli-labs customs clearance (less18-less20)
Linux MySQL 5.6.51 community generic installation tutorial
SQLI-LABS通关(less18-less20)
In depth study of JVM bottom layer (3): garbage collector and memory allocation strategy
Redis -- cache breakdown, penetration, avalanche
mapreduce概念和案例(尚硅谷学习笔记)
How to try catch statements that return promise objects in JS
随机推荐
Flex Jiugongge layout
SQL injection closure judgment
How to call WebService in PHP development environment?
CTF web practice competition
SQLI-LABS通关(less2-less5)
解决微信小程序swiper组件bindchange事件抖动问题
Go common compilation fails
pm2简单使用和守护进程
Unexpected inconsistency caused by abnormal power failure; Run fsck manually problem resolved
Explanation and application of annotation and reflection
Log - 7 - record a major error in missing documents (A4 paper)
Fe - eggjs combined with typeorm cannot connect to the database
SQLI-LABS通关(less18-less20)
PXC high availability cluster summary
Implement strstr() II
微信小程序基础
Underlying mechanism mvcc
CVE-2015-1635(MS15-034 )遠程代碼執行漏洞複現
Deployment API_ automation_ Problems encountered during test
Record RDS troubleshooting once -- RDS capacity increases dramatically