on 2018 Nov 07 9:04 AM
Scenario:
Assume that I have target_table with column c1, c2, c3, c4, and c5. And i also have source_table with column c1, c2, c3, c4, and c5 as well.
Assume that column c1 is primary key in both tables.
Requirement:
1) If row in source_table is NOT exists in target_table, then insert that row into target_table.
2) If row in source table is exists in target_table (in case both tables contains a rows with same c1 column value), then update column c2 ONLY in target_table, and DON'T update column c3, c4 and c5 in target_table.
How can it be done in BODS?
Request clarification before answering.
For distinguishing between inserts and updates, you use a Table_Comparison transform, right?
There are several ways to implement your requirement. As an easy solution, insert a Map_Operation transform in the data flow between the Table_Comparison and the target table. Don't modify any Row Types. Just add an Update mapping for every column you don't want to see modified, using the before_image function:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey...Your solution is working.
i have also posted illustration into below Q & A.
User | Count |
---|---|
76 | |
30 | |
10 | |
8 | |
8 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.