- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在构建一个维度数据仓库,并学习如何从我的仓库中的源系统为我的各种业务流程建模。
我目前正在将我们数据仓库中源系统的“投标”(工作投标)建模为包含以下信息的事实表:
问题是出价(或我尝试建模的大多数其他过程)可以经历各种状态,并在源系统中的任何给定时刻更新其信息。根据 Ralph Kimball 的说法,事实表只有在被视为“累积快照”时才应更新,而且我确信并非所有这些过程都会被下面的定义视为“累积快照”。
应如何根据 Kimball 小组的建议在数据仓库中为这些类型的流程建模?此外,哪种类型的事实表适用于投标(考虑到我在上面概述的事实)?
摘自 http://www.kimballgroup.com/2008/11/fact-tables/
The transaction grain corresponds to a measurement taken at a single instant. The grocery store beep is a transaction grain. The measured facts are valid only for that instant and for that event. The next measurement event could happen one millisecond later or next month or never. Thus, transaction grain fact tables are unpredictably sparse or dense. We have no guarantee that all the possible foreign keys will be represented. Transaction grain fact tables can be enormous, with the largest containing many billions of records.
The periodic snapshot grain corresponds to a predefined span of time, often a financial reporting period. Figure 1 illustrates a monthly account periodic snapshot. The measured facts summarize activity during or at the end of the time span. The periodic snapshot grain carries a powerful guarantee that all of the reporting entities (such as the bank account in Figure 1) will appear in each snapshot, even if there is no activity. The periodic snapshot is predictably dense, and applications can rely on combinations of keys always being present. Periodic snapshot fact tables can also get large. A bank with 20 million accounts and a 10-year history would have 2.4 billion records in the monthly account periodic snapshot!
The accumulating snapshot fact table corresponds to a predictable process that has a well-defined beginning and end. Order processing, claims processing, service call resolution and college admissions are typical candidates. The grain of an accumulating snapshot for order processing, for example, is usually the line item on the order. Notice in Figure 1 that there are multiple dates representing the standard scenario that an order undergoes. Accumulating snapshot records are revisited and overwritten as the process progresses through its steps from beginning to end. Accumulating snapshot fact tables generally are much smaller than the other two types because of this overwriting strategy.
最佳答案
就像评论中提到的那样,变更数据捕获是一个相当通用的术语,表示“我如何处理数据实体随时间的变化”,并且有整本书(以及无数的帖子和文章)。
无论任何陈述似乎暗示一个明确的黑白或总是这样的答案,真正的答案,像往常一样,是“它取决于” - 在你的情况下,取决于什么 Cereal 您需要特定的事实表。
如果您的数据以不可预测的方式或非常频繁地发生变化,那么实现 Kimball 版本的累积快照(想象有多少“里程碑”日期列,等等,你可能最终需要)。
因此,如果您愿意,您可以决定让您的事实表成为事务性事实表而不是快照,其中事实键为(出价键、时间戳),然后在您的应用层(无论是 View 、mview、实际应用程序还是其他),您可以确保给定查询仅获取每个出价的最新版本(请注意,这可以被认为是一种虚拟的累积快照)。如果您发现您不需要以前的版本(每个 Bid 的历史),您可以有一个修剪它们的例程(即删除它们或将它们移动到其他地方)。
或者,您只能允许在事实 (Bid) 处于最终状态时将其添加,但是您可能会有明显的延迟,因为新的(可更新的)Bid 不会进入事实表一段时间。
无论哪种方式,有几种可靠且经过验证的技术可以处理此问题 - 您只需清楚地确定业务需求并进行相应的设计即可。
祝你好运!
关于sql - 包含在源系统中定期更新的信息的事实表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26351343/
语境 我正在将一个旧的 php 电子商务网站变成一个用 gatsby.js 构建的静态网站。 我将所有产品元数据放入单独的 .json 文件(每个产品一个),并且我能够使用 json 和文件转换器插件
我曾经能够使用三指向上滚动在源/标题之间切换。自从升级到 Lion 后,我只进行常规滚动。有没有办法恢复该功能? Aka,当我像以前那样向上/向下滚动时,它不会跳到对应的位置。 更新 Apple 在
我有一个包含复选框输入的克隆元素。当克隆的元素未被选中时,我需要也取消选中源元素。有没有办法在 jQuery 中做到这一点?或者我是否以错误的方式处理这个问题(即使用clone())?我应该提到我的问
我有一个类,其中有两个 JSpinner 对象,x 和 y。我有一个更改监听器,它已添加到两者中。有人可以告诉我如何实现我的更改监听器,以便监听器可以区分两个对象之间的区别。例如伪代码: if(sou
我正在编写涉及 for 循环的代码,该循环在每个索引处进行计算。 这些计算中的最小值存储在一个变量中,我在程序末尾使用 MPI_Allreduce 来确定所有进程的全局最小值。 但是,我需要一种方法来
我需要在一个 Android 项目中创建一个 map View ,我从服务器获取自定义 map 图 block PNG。有人知道实现此类功能的简单许可 API 吗? 最佳答案 我使用了 OsmDroi
因为我必须创建一个可以更改图像 (src/background-url) 的函数。我想知道如何识别标签以及它是使用 src 还是 url 来访问图像。 让我们说 早些时候我写了一个可以
当我使用源 map 浏览器 https://github.com/danvk/source-map-explorer要检查捆绑包中的内容,我得到以下输出: D:\projects\angular\mT
我正在为客户将 Windev 应用程序移植到 Objective-C。出于显而易见的原因,使用以前的源代码会更简单。 不幸的是,它是加密的,我需要 EDI 才能看到它;完整版的 Windev 太贵了(
我有一个简单的视频播放器,它使用 WPF MediaElement 播放一系列视频。这些视频一起形成一个围绕静止图像移动的连续电影。在每个视频结束时,运动会卡住在当前播放视频的最后一帧。当我按下一个按
我需要更改 openlayer 的图层源(使用 open weather api)。目前我正在使用以下代码但没有成功。 let layer = this.map.getLayers().getArra
我正在尝试在 /dev/random 的机器上运行代码不会很快填满,我正在尝试使用的 Java 程序因缺少随机数而挂起。/dev/urandom产生“不太好”的随机数,但不会阻塞,对于这种情况,我宁愿
我需要 Yocto 项目的源代码包。我已经拥有整个项目的所有资源,但它们还包括开发工具。 我想有一种方法来生成将为目标图像构建的所有包的(修补的)源。因此,例如,如果目标图像包含 busybox,我想
如何对入侵者隐藏 iFrame src 假设我正在流式传输我的网络摄像头或我的电脑屏幕,这是 iframe 代码: 并且我不希望它在大多数浏览器上显示页面源中的流 URL 和检查功能! 这意
是否可以进入 Qt 源,例如qmainwindow.cpp,在 Qt Creator 中?目前我正在看到反汇编,但最好能看到源代码。 最佳答案 当然!但您可能必须首先: 转到 $QT_HOME/qt
我正在尝试创建一个包含很少动漫剧集的简单网站。我有一个关于 javascript 的问题。如何通过单击我的链接之一来更改视频源?我明白,我必须使用事件监听器,只需更改 取决于我点击的链接,但我不太擅长
我有一个带有 BindingSouce 的 DevExpress GridControl。我想清除 BindingSource 并用新数据填充它。我这样做: var list = new List()
当单击提交输入按钮时,我尝试将其他参数(选定复选框的列表)传递到服务器处理的 DataTables 表#my_table: 这可能意味着我必须将 my_table.sAjaxSource 设置为后端脚
(好吧,别对我大喊大叫,这里已经很晚了:)) 我正在研究 delta diff 工具(命令行工具或组件,只要我可以从 Delphi 2010 调用它们就可以了) 我有这个项目,我将文件上传到服务器,我
我需要解析 Yahoo Weather RSS feed 中的某个位置,例如 http://weather.yahooapis.com/forecastrss?w=44418&u=c例如,获取最高、最
我是一名优秀的程序员,十分优秀!