I am using update strategy transformation in Informatica to update/insert a table. Following are the steps taken in mapping/session :
1) Used update strategy transformation after expression. Post which Update strategy connected directly to target. 2) Provided 'DD_UPDATE' statement in Update strategy expression. 3) Marked 'treat source rows as' to 'Data driven'. 4) Checked 'Insert', 'Update else insert' property at Target level in the session.
When I run the mapping, it updates the records in target if values are already present in the target table and inserts the records if not found in the target tables. However, when I check the session log (set to verbose data), I found the following thing :
Send Expression output- > Update strategy (Value of rows as 0 which is insert) Send Update strategy output - > Target (Value of rows as 1 which is update). Loading to target - > 1 row as update which is already present, 3 rows inserted which are new.
The question is how does Informatica know how to treat a row as insert/update before loading as per above scenario? Since the values passed from update strategy are set for Update.