简体   繁体   English

加载灵活的事实表SSIS

[英]Loading a flexible fact table SSIS

I have the following fact table : PlaceId, DateId, StatisticId, StatisticValue. 我有以下事实表:PlaceId,DateId,StatisticId,StatisticValue。 And I have a dimension with the statistics Ids and its names as the following : StatisticId, StatisticName. 我有一个带有统计ID和其名称的维度,如下所示:StatisticId,StatisticName。

I want to load the fact table with Data with 2 statistics. 我想用2个统计数据加载事实表。 With this architecture, each row of my data will be represented with 2 rows in my fact table. 使用这种体系结构,我的事实表中的数据的每一行将用两行表示。

The Data has the following attributes : Place,Date,Stat1_Value, Stat2_Value. 数据具有以下属性:Place,Date,Stat1_Value,Stat2_Value。

How to load my fact table with Ids of these measures and its corresponding Values. 如何使用这些度量的ID及其对应的值加载我的事实表。

Thank You. 谢谢。

I would use SSIS to move your data into a holding table that has the same columns as your data. 我将使用SSIS将您的数据移动到与数据具有相同列的保存表中。 Then call a stored procedure that uses SQL to populate your fact table, using UNION to get all the Stat1_Values, and then all the Stat2_Values. 然后调用存储过程,该存储过程使用SQL填充事实表,使用UNION获取所有Stat1_Values,然后获取所有Stat2_Values。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM