如何获得“原始”体验来自 Analysis Services 的事实数据

发布于 2024-08-18 14:37:45 字数 612 浏览 3 评论 0原文

我们开发了一个自定义的 MOLAP 引擎,用于实时处理大量数据。现在我们需要将 SSAS 与我们的系统集成。 Dimension 的元信息和属性数据非常容易获取。 但是,如何在不使用 SSAS 计算聚合(即仅存储在叶子上的数据)的情况下获取事实数据? 我们自己进行聚合和计算。

从 SQL 数据库中选择数据并不是一个解决方案,因为 Cube 在加载时可以执行联接、过滤。清除数据等。

示例:

假设我们有产品维度:

  • Product.All
    +产品.面包
    +产品.椅子
    +Product.Book

和事实表 - Sales:

|Product|Qty|  
|Bread  | 1 |  
|Chair  | 3 |  

我只想从多维数据集中获取真实数据,而不是聚合数据:

|Product|Qty|
|All    | 4 |  
|Book   | 0 |  
|Bread  | 1 |  
|Chair  | 3 |

We are developed a custom MOLAP engine for live processing a large amount of data in process. And now we got a requirement to integrate SSAS with our system. Dimension's meta info and attributes data are very easy to get.
But how can I get facts data without making SSAS to calculate aggregates i.e. data that stored only on leafs?
Aggregates and calculations we perform ourselves.

Selecting data from SQL Database is not a solution because Cube while loading can perform joins, filtering. clearing of data etc.

Example:

Suppose we have Product Dimension:

  • Product.All
    +Product.Bread
    +Product.Chair
    +Product.Book

And facts table - Sales:

|Product|Qty|  
|Bread  | 1 |  
|Chair  | 3 |  

I want to get from cube only real data, not aggregated one:

|Product|Qty|
|All    | 4 |  
|Book   | 0 |  
|Bread  | 1 |  
|Chair  | 3 |

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

高冷爸爸 2024-08-25 14:37:46

最重要的是,如果不重新处理多维数据集,您就无法获取更新的事实。如果您想要实时原始数据,您将必须根据数据仓库中的维度/事实表自行计算。

Bottom line, you cannot get the updated facts without reprocessing the cube. If you want the raw data in real time you will have to actually calculate it yourself from the dimension/fact tables in the data warehouse.

仙女 2024-08-25 14:37:46

在 ssas 中,您可以禁用层次结构级别聚合,并且对于空行,在获取数据之前使用非空作为关键字

in ssas u can disable hierarchy level aggregation and for the empty rows use non- empty as a keyword before fetching the data

吾性傲以野 2024-08-25 14:37:45

尝试查看 SSAS 中的钻取。这可以显示事实粒度数据,并且在 Excel 中可以作为双击单元格时的默认操作使用。您可以自定义结果集,只要所有度量/维度都来自相关事实表:

http://csjohnlam.spaces.live.com/Blog/cns!996308EF3A99432B!214.entry?sa=340601263

您还会发现这很有用:

http://assstoredprocedures.codeplex.com/wikipage?title=Drillthrough&referringTitle=Home

Try looking at DrillThrough in SSAS. This can display the fact-grain data, and is available in Excel as the default action when you double-click a cell. You can customise the result set, so long as all measures/dimensions come from the relevant fact table:

http://csjohnlam.spaces.live.com/Blog/cns!996308EF3A99432B!214.entry?sa=340601263

You'll also find this useful:

http://asstoredprocedures.codeplex.com/wikipage?title=Drillthrough&referringTitle=Home

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文