Analysis Services 2008 中多个层次结构中的属性
我设计了一个相对简单的使用星型模式的数据仓库。 我有一个事实表,其中只有一个主键以及 CompanyID 和 Amount (实际测量)列。 当然,我还有一个维度表来表示事实表引用的公司。
现在我需要为公司创建一个单级层次结构(CompanyGroup)。 这似乎是一项简单的任务,但问题是应允许单个公司存在于多个 CompanyGroup 中。
我通过创建一个名为 CompanyHierarchy 的新维度表进行了实验,该表包含主键、GroupKey 和 CompanyKey。 定义用户定义的层次结构(其中 GroupKey 为顶层,CompanyKey 为第二层)会在处理维度时产生 CompanyKey 属性的发现重复属性键错误。
所以,我不太确定如何开始。 如何在属性可以多次存在的维度中创建用户定义的层次结构?
我当前的立方体定义的屏幕截图可以在以下位置查看:
img132.imageshack.us/img132/6729/ssasm2m.gif
I have designed a relatively simple data warehouse that uses the star schema. I have a fact table with just a primary key along with CompanyID and Amount (the actual measurement) columns. Of course I also have a dimension table to represent the companies which the fact table references.
Now I'm required to create a single level hierarchy (CompanyGroup) for companies. This seems like an easy task but the catch is that a single company should be allowed to exist within multiple CompanyGroups.
I experimented with this by creating a new dimension table called CompanyHierarchy that holds a primary key, GroupKey and CompanyKey. Defining a user defined hierarchy where GroupKey is the top level and CompanyKey is the second level yields A duplicate attribute key has been found error for the CompanyKey attribute while processing the dimension.
So, I'm not quite sure how to even start with this. How can I create a user defined hierarchy within a dimension where attributes can exist multiple times?
Screen shot of my current cube definition can be seen at:
img132.imageshack.us/img132/6729/ssasm2m.gif
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要创建多对多关系(一个公司可以属于多个组,一个组可以拥有多个公司) Adventure Works 多维数据集中有一个围绕销售原因维度的多对多关系的示例,有一份内容广泛的白皮书 此处解释了使用多对多关系的多种不同方式。
我记录了一种支持一个层次结构中多个成员的技术 此处
You need to create a many-to-many relationship (one company can belong to many groups and one group can have many companies) There is an example of a many-to-many relationship in the Adventure Works cube around the sales reason dimension and there is an extensive white paper here that explains a number of different ways of using many-to-many relationships.
There is also a technique for supporting multiple members in the one hierarchy that I documented here