SCD TYPE1 MAPPING

The SCD Type 1 methodology overwrites old data with new data, and therefore does no need to track historical data .

  1. Here is the source
  2. We will compare the historical data based on key column CUSTOMER_ID.
  3. This is the entire mapping
  4. Connect lookup to source. In Lookup fetch the data from target table and send only CUSTOMER_ID port from source to lookup
  5. Give the lookup condition like this
  6. Then rest of the columns from source send to one router transformation
  7. In router create two groups and give condition like this
  8. For new records we have to generate new customer_id. For that  take a sequence generator and connect the next column to expression .New_rec group from router connect to target1(Bring two instances of target to mapping, one for new rec and other for old rec) .Then connect next_val from expression to customer_id column of target
  9. Change_rec group of router bring to one update strategy. and give the condition like this

  10. Instead of 1 you can give dd_update in update-stratgy. Then connect to target.