I am not sure if this is answered in the Kimball Data-Warehouse literature - I could not find an answer.
Lets say you have a table with a couple of SCD2 aware columns, and some SCD1 columns. The question is simply this: Which records are updated when a change to an SCD1 column happens?
Do you change ALL records, the current one and all historic ones? Or do you change only the most recent (open) record? I tend to go by "all", while all my colleagues insist on "most recent only".
The only reason I can give for my opinion is, that I want a COUNT(DISTINCT ...)
to give the same result when I run it on the business key column, or on an SCD1 column.
Thinking of it, there are two special cases: What if a record does not have a current version, if the most recent one went out of scope and there was no new instance? What if I use my SCD2 logic to prepare records that will become active automatically in the future?
If I only update the most recent open version, than that would mean I do not change anything in the first special case, while in the other case I need to change all future (prepared) records. Thinking of it... I am confident "all" is the correct answer.
Can anyone point to a well known white-paper website (like Kimball, Microsoft) that gives an answer?
All. The intent of type 1 is that facts are associated with the attribute's current value:
https://www.kimballgroup.com/2013/02/design-tip-152-slowly-changing-dimension-types-0-4-5-6-7/
In a type 2 SCD facts are associated with a "version" of the dimension that was active when the fact occurred. In order for a fact that's associated with a version to be "associated with the attribute's current value" that current value must be updated on all versions of the dimension.
For instance if you have
and
And you want to associate historical Sales facts with the customer's current SalesPerson rather than the SalesPerson active at the time of the sale, you must update CustomerDim for all versions of that Customer. Eg
Or else a query like
won't return the older sales of that SalesPerson's customers.