6.1 Type 1
The Type 1 methodology overwrites old data with new data, and therefore does not track historical data.
This is useful for making changes to dimension data.
N_PRODUCT_SKEY | V_PRODUCT_NAME | D_START_DATE | D_END_DATE | F_LATEST_RECORD_INDICATOR |
1 | PL | 5/31/2010 | ###### | Y |
In this example,
N_PRODUCT_SKEY
is the surrogate key column which is a unique key for each record in the dimension table.V_PRODUCT_NAME
is the product name.D_START_DATE
indicates the date from which this product record is valid.D_END_DATE
indicates the date till which this product record is valid.F_LATEST_RECORD_INDICATOR
with value 'Y', which indicates this is the latest record in the dimension table for this product and 'N' indicates it is not.- If the
V_PRODUCT_NAME
column is set as a Type 1 SCD column and if there is a change in the product name to 'Personal Loan' from 'PL' in the above example, in the next processing period, then when SCD is executed for the new processing period the record in the above example changes to:
N_PRODUCT_SKEY | V_PRODUCT_NAME | D_START_DATE | D_END_DATE | F_LATEST_RECORD_INDICATOR |
1 | Personal Loan | 6/30/2010 | ###### | Y |