Hi, I am new to ODI and can not work out how to do the following.
I want to create an interface that :
1) Appends rows to the existing target table
2) changes the current_flg to "Y" for the most recently appended rows
3) changes the current_flg to "N" for all other rows
1) is OK, I am using the IKM SQL Control Append
2) is OK, as in the interface I set current_flg to 'Y'
3) - I can not work out how to do this. There is effectively no link between then "old" and newly appended rows , and no primary Key, so I do not think incremental or scd IKM is appropriate.
If you can modify the KM thats fine else create one package.
Put one procedure prior to the interface. In the procedure use one update statement to update the target table and set the current_flg to 'N".
Net run the interface using sql control append. ( Inside interface you must have set the current_flg to 'Y')
So what ever record will be inserted, flag value will be set to Y.