简体   繁体   中英

Loading a flexible fact table SSIS

I have the following fact table : PlaceId, DateId, StatisticId, StatisticValue. And I have a dimension with the statistics Ids and its names as the following : StatisticId, StatisticName.

I want to load the fact table with Data with 2 statistics. 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.

How to load my fact table with Ids of these measures and its corresponding Values.

Thank You.

I would use SSIS to move your data into a holding table that has the same columns as your data. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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