SCD 2 EndDate for first record is not null

Topics: General, Questions About Best Practices
Feb 8, 2011 at 5:33 PM


Please advice me I am using Kimball component 1.5, I have tested few records where everything is fine except when I change some records for SCD2 column in source table and run the package. It enter new rows for all the change enteries with ValidToDate as Null but for the first record in sequence it enter yesterday date for even new row which has been modified. For example below first modified row with surrogate key 22 has ValidToDate(or EndDate) but others has Null.

CustKey  CustName            BusinessKey              EffectiveFromDate             ValidToDate

8            Bit Ltd                     1017012                     5-Feb-2011                       6-Feb-2011

22          Bit Company         1017012                    7-Feb-2011                       6-Feb-2011                   <->Modified row

14          Raynolds Ltd         1017013                   5-Feb-2011                       6-Feb-2011             

24          Raynolds Group   1017013                   7-Feb-2011                       NULL                              <->Modified row

18          Mars Leisure         1017014                   5-Feb-2011                       6-Feb-2011             

23          Mars Gym              1017014                   7-Feb-2011                       NULL                              <->Modified row


Feb 22, 2011 at 9:59 PM

Keep in mind that the SCD component itself isn't making any changes in your database.  That's up to how you've configured the (OLE DB) Destination and possibly OLE DB Command components.  I would suggest that you place some data viewers on the outputs of the component to see what the rows look like then, and make sure you're using appropriate transforms after it to persist the changes to your database.  You may want to look at the videos on the home page to get a good idea how to hook up the destination transforms...