Hi Erland, many thanks for your reply and interest.
My post is regarded to follow a good strategy to manage the modified rows for a fact table.
As a first thing, in order to feed my fact table I read a SQL Server staging area having data read from an Oracle database. I cannot act at Oracle source level, I can act at SQL Server staging area/data warehouse level.
My fact table of the SQL Server data warehouse now is composed of more 50 fields, other the surrogate key. Several of these 50 fields aren't simply read from the staging area but are derived from a transformation and/or calculation.
I need to:
a. import data from the staging area to the fact table each day if a fact row is changed (before to write a potential row in the fact I write it into a temporary table);
b. understand if a fact row is changed respect to the previous fact row (related to a previous day respect to the current day when the daily import is executed).
In order to understand if a fact row is changed I need to control if a change is occurred for the 50 fields above mentioned; so, I'd like to find a good manner to detect a change for all these fields avoiding to write many IF statements: using CHECKSUM function
could be a good solution?
I've already created some procedures to retrieve the historical data for my fact table and for the daily import: I'd like to improve the written code in particular to manage better the historical data retrieval by simulating backwords the daily data import.
For my work I need to conform to the management of the Oracle data source and to his related data quality. It is clear for me to have for the fact table a surrogate key, and dates to indicate when a row is valid or not, and so on.
Do I need other informations about this issue? Thanks for your help.
-
Edited by
pscorca
17 hours 51 minutes ago