I use SQL Server 2012
for OLTP
Database and created a Data Warehouse in SQL Server 2012
.
I design Facts
and Dimensions
inside Data Warehouse
with several Views.
Some of my Fact table are made by joinning several tables inside my view.
I use CDC
(Change Data Capture) to get noticed of any OLTP
changes and save these changes in a Stage Database
and finally I have to update Data Warehouse based on above saved changes.
The question is how can I detect which records of my Data Warehouse have to be updated according to these saved changes by the CDC?
For more description :
I have SalesFact
in my Data Warehouse
that has one View
like this
Select
Sum(T1.X),
Sum(T2.Y),
Sum(T3.Z),
Sum(T4.W)
From T1
Left join T2 On (....)
Left join T3 On (....)
Left join T4 On (....)
Group By T1.X,T2.Y,T3.Z,T4.W
Also I have 4 CDC Tables
to save the OLTP changes as :
Create Table T1Change()
Create Table T2Change()
Create Table T3Change()
Create Table T4Change()
so, How can I find which records of Data Warehouse
must be updated according to these changes ?