Say I want to implement SCD type2 history dimension table (or should I say table with SCD type2 attributes) in the DWH system which for now I has been implementing as a "usual table" with a natural key
+ primary surrogate key
+ datefrom
+ dateto
+ iscurrent
additional columns.
where
- the
primary surrogate key
is needed in order to use it as a foreign key in all fact tables and datefrom
+dateto
+iscurrent
columns are needed in order to track a history.
Now I want to use a system-versioned temporal table in the fact-dimension DWH design, but MSDN is said that:
A temporal table must have a primary key defined in order to correlate records between the current table and the history table, and the history table cannot have a primary key defined.
So it looks like I should use a view with a primary surrogate key
generating "on the fly" or another ETL process, but I do not like the both ideas...
Maybe there is another way?