Flags records for update in an update strategy expression. DD_UPDATE is equivalent to the
integer literal 1.
Note: Use the DD_UPDATE constant in the Update Strategy transformation only. Use DD_UPDATE
instead of the integer literal 1 to facilitate troubleshooting complex numeric expressions.
When you run a workflow, select the data-driven update strategy to write records to a target
based on this flag.
Examples
The following examples modify a mapping that calculates sales for the current month. The
mapping loads sales for one employee.
This expression flags records for Alex as updates and flags all others for rejection:
IIF( EMPLOYEE.NAME = 'Alex', DD_UPDATE, DD_REJECT )
This expression uses numeric literals to produce the same result, flagging Alex’s sales for
update (1) and flagging all other sales records for rejection (3):
IIF( EMPLOYEE.NAME = 'Alex', 1, 3 )
Notice that the expression using constants is easier to read than the expression using
numeric literals.
The following update strategy expression uses SYSDATE to find only those orders that have
shipped in the last two days and flag them for insertion. Using DATE_DIFF, the expression
subtracts DATE_SHIPPED from the system date, returning the difference between the two dates.
Because DATE_DIFF returns a Double value, the expression uses TRUNC to truncate the
difference. It then compares the result to the integer literal 2. If the result is greater
than 2, the expression flags the records for rejection. If the result is 2 or less, it flags
the records for update. Otherwise, it flags them for rejection:
IIF( TRUNC( DATE_DIFF( SYSDATE, ORDERS.DATE_SHIPPED, 'DD' ), 0 ) > 2, DD_REJECT, DD_UPDATE )