Database Reference
In-Depth Information
The Update Strategy transformation
Update Strategy transformations are used to INSERT , UPDATE , DELETE , or REJECT re-
cords based on the defined condition in the mapping. An Update Strategy transformation is
mostly used when you design mappings for slowly changing dimensions. When you imple-
ment SCD, you actually decide how you wish to maintain historical data with the current
data. We have discussed SCDs in Chapter 3 , Implementing SCD - Using Designer Screen
Wizards . When you wish to maintain no history, complete history, or partial history, you
can achieve this functionality by either using the property defined in the session task or us-
ing the Update Strategy transformation.
When you use the session task, you instruct Integration Service to treat all records in the
same way, that is, either INSERT , UPDATE , or DELETE .
When you use the Update Strategy transformation in the mapping, the control is no longer
with the session task. The Update Strategy transformation allows you to INSERT ,
UPDATE , DELETE , or REJECT records based on the requirement. When you use the Up-
date Strategy transformation, the control is no longer with the session task. You need to
define the following functions to perform the corresponding operations:
DD_INSERT : This is used when you wish to insert records, which are also repres-
ented by the numeral 0
DD_UPDATE : This is used when you wish to update the records, which are also
represented by the numeral 1
DD_DELETE : This is used when you wish to delete the records, which are also
represented by the numeral 2
DD_REJECT : This is used when you wish to reject the records, which are also rep-
resented by the numeral 3
Consider that we wish to implement a mapping using the Update Strategy transformation,
which allows all employees with salaries higher than 10000 to reach the target and elimin-
ates all other records. The following screenshot depicts the mapping for this scenario:
Search WWH ::




Custom Search