知识卡片
代理键隔离来源业务键
维度表使用代理键连接事实表,可避免不同来源的业务键相同却指向不同实体。分布式场景可考虑确定性散列,但应设计名称空间、碰撞检查和键变更策略;散列值不能自动代替数据质量校验。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Practical Lakehouse Architecture》第7章《The Big Picture: Designing and Implementing a Lakehouse Platform》(源文件:_epub-src/OEBPS/ch07.html)
- 结论依据:原文建议维度表生成代理键而不直接复用来源业务键,因为多来源可能出现相同键,并提到散列方案。
- 原始内容:Create surrogate keys for dimension tables to join them with the fact tables. Do not use the business keys from source systems, as they can be the same across sources. When creating the surrogate keys for lakehouse tables, use hashing functions (like SHA-2 or MD5) instead of database sequences used in traditional warehouses. Sequences are not