Microsoft SQL Server 2012 缓慢更改维度历史属性更改日期和状态

Microsoft SQL Server 2012 Slowly Changing Dimensions Historical Attributes Change Date as well as Status

我在 MS SQL Server 2012 with VS 2010 上遇到以下问题:

我想使用 SSIS for Slowly Changing Dimensions 来更改历史属性。 由于向导只让我有机会决定将信息保存在一列或两个日期列中,无论记录是否过时(请参阅 https://msdn.microsoft.com/en-us/library/ms187958.aspx)。 但我想两者都做,将信息保存在 'Status' 列中,同时更新 'StartDate' 和 'EndDate'.

table 名员工使用 SSIS 后的样子示例:

员工 Emma Johnson 结婚,因此在 20-02-2013 将她的姓氏更改为 Smith。

员工编号 | EmployeeIDAlternateKey |名字 |姓 |开始日期 |结束日期 |状态

1 | 123 |艾玛 |约翰逊 | 2013 年 1 月 1 日 | 20-02-2013 |空

2 | 123 |艾玛 |史密斯 | 20-02-2013 |空 |当前

感谢您的帮助!

你如何在缓慢变化的维度组件生成的拆分中实现你的逻辑

if the record is to be inserted set the status to "current"; and insert the record in the dimension

if the record is to be updated set the status to "NULL"; and update the record in the dimension