SCD Type 2 - EffectiveDate

  • For an initial load of a new Data Warehouse, if the source systems do not store historical data, is it legitimate to populate the EffectiveDate column for Type 2 SCDs with the date that the initial load is run on?



  • I would like to know too.

    In my system, I have the effective ETL load date that is used instead. That's only because if the source effective date is unknown, then my processes fail over to the last known effective date, the ETL load date.

    I've been told that theory was sound, but would love to learn more.

  • I would use the most recent effective date from the source system, but also try to talk to the source system DBAs to make sure there is not an Audit database out there somewhere that could have some history/audit records.

    Most importantly make sure the business stakeholders know the situation as soon as possible, and manage their expectations appropriately.

  • sneumersky (2/12/2014)

    .... but also try to talk to the source system DBAs .....

    If only there were some (or even one!). 😉

    I agree with your sentiment though.

  • If there is a foreign key referencing your table then consider whether it's important for the date/time of the referencing row to correspond to the date/time range of your effectivedate. If referential integrity within time periods is important to you then you need a strategy that supports that, e.g. populate the referencing rows and the parent rows with the same date ranges.

  • For this particular implementation, i can't think of a scenario where a column purely used to handle a type 2 SCD for a particular attribute would be referenced by a foreign key, but I understand what you're getting at.



  • If any of your transactions reference a date prior to the effective date on the dimension, this could get somewhat confusing.

    For an initial load, I generally use a "placeholder" date of "19000101". That way it's obvious that the date doesn't have any meaning other than ensuring that the dimension entry is valid prior to any facts referencing it.

    Alternatively, you could work out what the first date each dimension entry is referenced, and use those as the effective dates. That can be a lot of work (depending on the size of your fact tables) though, so unless you have a business case for why that would be necessary, I would suggest that a placeholder would be easier.

  • I use the placeholder as well.

    Because you only just started recording history, the initial load is the representation of the "single version of facts" by the source system as it is known at that exact time.

    You need to communicate clearly to the end users that all transaction data before the initial load is mapped to the initial view provided by the source system and that they need to take that into account when drawing conclusions.

    Need an answer? No, you need a question
    My blog at
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Thanls all. I think using a placeholder makes sense so that's what I'll do. Very much agree about setting user expectations!



Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply