Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server SSAS多维数据集建模事实或维度-无附加列_Sql Server_Ssas_Cube_Powerpivot_Olap Cube - Fatal编程技术网

Sql server SSAS多维数据集建模事实或维度-无附加列

Sql server SSAS多维数据集建模事实或维度-无附加列,sql-server,ssas,cube,powerpivot,olap-cube,Sql Server,Ssas,Cube,Powerpivot,Olap Cube,我对BI建模非常陌生,并被分配了一个项目,为患者管理系统(数百万行)创建BI解决方案。系统中没有销售或附加信息。基本上所有的措施都将被计算在内。我发现很难找到我需要的模型的好例子/教程,因为大多数BI实现似乎都是基于销售的 如果有人能帮我解决模特问题,我将非常感激 实现中的表(为简洁起见排除列)是 Patient ( Key -> Surrogate Key PatientId -> Source System Id Name -> Text A

我对BI建模非常陌生,并被分配了一个项目,为患者管理系统(数百万行)创建BI解决方案。系统中没有销售或附加信息。基本上所有的措施都将被计算在内。我发现很难找到我需要的模型的好例子/教程,因为大多数BI实现似乎都是基于销售的

如果有人能帮我解决模特问题,我将非常感激

实现中的表(为简洁起见排除列)是

Patient (
    Key -> Surrogate Key
    PatientId -> Source System Id
    Name -> Text
    AgeKey -> FK to Age Dimension Table
    NationalityKey -> FK to Nationality Dimension Table
    DateOfBirthKey -> FK to Date Dimension Table
    GenderKey -> FK to Gender Dimension Table
    etc.
)

Referral (
    Key -> Surrogate Key
    ReferralId -> Source System Id
    PatientKey -> FK to PatientTable
    ReferredAtDateKey -> FK to Date Dimension Table
    PriorityKey -> FK to Priority Dimension Table
    SpecialtyKey -> FK to Specialty Dimension Table
    etc
)

WaitingList(
    Key -> Surrogate Key
    WaitingListId -> Source System Id
    ReferralKey -> FK to ReferralTable
    AddedToListDateKey -> FK to Date Dimension Table
    RemovedFromListDateKey -> FK to Date Dimension Table
    StatusKey -> FK to Waiting List Status Table
    Position -> int
    etc
)
我需要能够围绕患者、转诊和等待名单构建报告/图表,以便使用视图在SSA中创建事实表。例如:

FactPatient (
    Key -> Surrogate Key
    PatientId -> Source System Id
    Name -> Text
    AgeKey -> FK to Age Dimension Table
    NationalityKey -> FK to Nationality Dimension Table
    DateOfBirthKey -> FK to Date Dimension Table
    GenderKey -> FK to Gender Dimension Table
    etc.
)

FactReferral (
    Key -> Surrogate Key
    ReferralId -> Source System Id
    -- Patient
    Name -> Text
    AgeKey -> FK to Age Dimension Table
    NationalityKey -> FK to Nationality Dimension Table
    DateOfBirthKey -> FK to Date Dimension Table
    GenderKey -> FK to Gender Dimension Table
    etc.
    -- Referral
    ReferredAtDateKey -> FK to Date Dimension Table
    PriorityKey -> FK to Priority Dimension Table
    SpecialtyKey -> FK to Specialty Dimension Table
    etc
)

FactWaitingList(
    Key -> Surrogate Key
    WaitingListId -> Source System Id
    -- Patient
    Name -> Text
    AgeKey -> FK to Age Dimension Table
    NationalityKey -> FK to Nationality Dimension Table
    DateOfBirthKey -> FK to Date Dimension Table
    GenderKey -> FK to Gender Dimension Table
    etc
    -- Referral
    ReferredAtDateKey -> FK to Date Dimension Table
    PriorityKey -> FK to Priority Dimension Table
    SpecialtyKey -> FK to Specialty Dimension Table
    etc
    -- Waiting List
    AddedToListDateKey -> FK to Date Dimension Table
    RemovedFromListDateKey -> FK to Date Dimension Table
    StatusKey -> FK to Waiting List Status Table
    Position -> int
    etc
)
如您所见,我试图保持星型模式,因为我将外键/关系包括到相关对象的维度表中,例如FactReferral拥有所有FactPatient关系

这是正确的建模方法吗?或者我应该在FactReferral中使用雪花模式,只是与FactPatient有关系

我是否应该为没有关系的患者创建一个额外的非规范化维度,然后在它和FactReference之间创建一个关系?e、 g

DimPatient (
    Key -> Surrogate Key
    PatientId -> Source System Id
    Name -> Text
    Age-> int
    Nationality -> Text
    DateOfBirth -> Date
    GenderKey -> Text
    etc.
)

FactReferral (
    Key -> Surrogate Key
    ReferralId -> Source System Id
    -- Patient
    PatientKey -> FK to Patient Dimension Table
    -- Referral
    ReferredAtDateKey -> FK to Date Dimension Table
    PriorityKey -> FK to Priority Dimension Table
    SpecialtyKey -> FK to Specialty Dimension Table
    etc
)
最终,我不确定如何对一对多关系树建模。还有其他与转诊相关的表格,如评估和出勤率,我已经从我的描述中排除,但我也有同样的问题

欢迎提供任何帮助或建议

谢谢

PB_BI提供的答案

我不认为你需要一个“事实病人”表 数据,因为它看起来像是完全三维的。相反,当它 要创建多维数据集,请使用患者维度表创建 与患者有实际关系的测量组 尺寸(用于计数等)。然后你的事实证明 FactWaitingList表只需要有一个外键即可访问 患者维度(并非所有特定于患者的维度,如 国家钥匙等)

我按照建议创建了一个非规范化视图,并将其添加到我的数据源视图中。然后,我可以从FactReferral->PatientKey向此添加关系

在此之后,我基于DimPatients视图创建了一个维度,并能够将DimPatients中的所有列添加为维度的属性。这使他们容易被质疑

我做的最后一件事是为DimPatient维度添加一个度量值组,它使我能够对患者数据执行查询

希望有一天这能帮助别人

马特