Page 1 of 1

How to im plement the "SCD2" in DataStage Parallel

Posted: Thu May 01, 2008 7:54 am
by deesh
Hi,
I am not yet implemented "SCD2". Can help some one how to Implement "SCD2" in DataStage Parallel Edition.

Posted: Thu May 01, 2008 2:39 pm
by ray.wurlod
Do you understand what "SCD2" is? The things that you need to do for dimension tables are to capture a before-image of what's current in the target table in a form you can lookup using the business key. As you process the new data you determine whether the business key exists or not in the target and, if it does, whether it has changed. If it is new, insert a new record with a new surrogate key. If it is changed, update the existing record such that it is marked non-current and insert a new current record. When loading the fact table, you also need to lookup the surrogate key using the business key; the surrogate key will be a foreign key in the fact table.