DWH Temporality Part 1: The Challenge
Which is a time dimension (time line). What is a time slice? What is SCD Type 2? What is the relationship to as-is, as-was, as-of
In this simplified example, I can choose the business validity as a timeline and when this information was recorded in an IT system as a second time line. Thus we have a time surface.
In data warehousing, however, a third time bar is added in each case: when did the data warehouse learn of new or changed information. If you now draw this third timeline perpendicular to the existing time area, you get a cube, to put it simply. This is the reason why I like to talk about time dimensions. Because it is difficult to imagine more than 3 dimensions, I will not go into any other time lines beyond the three already mentioned ones.
In order to avoid the different problems with the different terminologies, I like the approach (because the different time lines, if they can be understood as dimensions arranged in a cube) are addressed with dimension numbers.
-
1d: when was an entry from a business perspective valid. According to Snodgrass quoted by Kaul “capturing the history of a changing reality”: Valid Time.
-
2d: Capturing time / System Time / Logged Time / Inscription Time / (((Transaction Time))) / Approximation for Assertion Time in the source IT system. Assertion Time according to Johnston quoted by Kaul: “the time during which a row of data is asserted to make a true statement”.
-
3d: Acquisition Time / System Time / Logged Time/ Load Time / Inscription Time / (((Transaction Time))) / Approximation Assertion Time in the DWH system. Assertion Time according to Johnston quoted by Kaul: “the time during which a row of data is asserted to make a true statement”.
Time slice
Now what does SCD Type 2 mean?
Usually the term is used as a synonym for the creation of the 3d time line in the data warehouse. The loading time into the DWH is usually used to start a new time slice. Implicitly the load time of the next data set for the same key is used to end the assertion period of the previous entry. This method has the big advantage that all changes in the source system can be captured and output for each assertion time, what was considered true at that time. The problem is that there are data warehouse implementations and also modelers who model DWHs and who don’t even ask themselves: which timeline do we actually represent here? Is this timeline even suitable to fulfill the requirements of our reporting? Do we even need this timeline for our evaluations? Are the recorded changes only corrections or do we really record changes in the real world? From my personal point of view, this lack of analysis of the business requirements leads to ill-considered implementations in which all dimensions are output in SCD Type 2 form in all reports. This lack of understanding is also the reason for the bad habit of using the terms VALID_FROM and VALID_TO for this 3d timeline (fortunately Dan Linstedt established the term Load Time for the Data Vault world). In the further course of this series, I will try to explain that in certain cases this is not only superfluous but can also be wrong in some cases. At the same time, I would like to offer alternative solutions on how to deal with time in the Data Vault (and Data Warehouse) in general.
See Datavault Builder in action
Great, pick a time that works for you: