SCD2 (date range) - marking the dates
To implement SCD2 by maintaining a flag, follow these steps:
- In the
Designer, go toTools|Mapping Designer|Mapping|Wizard|Slowly Changing Dimensionsas shown in the following screenshot:

- A new window will pop up asking the name (
m_SCD2_DATE_RANGE) of the new SCD mapping. SelectType 2 Dimension - keep a full history of the changesas we are implementing SCD2, and click onNext:

- The next screen will ask you to select the source. Select a source from the drop-down. We are using
EMP_FILE.txtas the source file for our reference. Also, specify the name of the target you wish to create. We will name the targetEMPLOYEE_SCD2_DATE_RANGEfor our reference in this book. Click onNext:

- In the next window, select
EMPLOYEE_IDasLogical Key Field. Also, addLOCATIONunderFields to compare for changes,and click onNext:

- The next screen asks you to choose the option to maintain history in target. Select
Mark the dimension records with their effective date range...