how to delete and insert specific row in table using talend

One Star

how to delete and insert specific row in table using talend

Hi,
i have problem here. How to delete specific row and insert it with new data in table like below :

Table A (Source)
-------------------
ID NAME
-------------------
A JALIL
A CAPIK
A MAMA
B KETAM
B CIPOT
-------------------

Table B (Target)
-------------------
ID NAME
-------------------
A JALIL
A CAPIK
B KETAM
B CIPOT
-------------------

Expected Output
-------------------
ID NAME
-------------------
A JALIL
A CAPIK
A MAMA
B KETAM
B CIPOT
-------------------
As you can see..table B do not have one row data which is ( A MAMA). So what i want to do is i want to delete specific row for A data like below
Table B (Target)
-------------------
ID NAME
-------------------
B KETAM
B CIPOT
-------------------

Then,all row for A data at table A (source) will be insert into table B(target) and become like this
Table B(target)
-------------------
ID NAME
-------------------
A JALIL
A CAPIK
A MAMA
B KETAM
B CIPOT
-------------------
before this i just try like figure 1. what happen is when i run many time the no of row at
"target_table"-----> tFilterRow_1 -----> "target_table" increasing but the output still i get like expected output. Is there any alternative way which can improve this problem? I hope u understand what i means.

Thanks,
Isma
One Star

Re: how to delete and insert specific row in table using talend

Why to delete and reinsert the rows?
Just bring the input from Source table A to tMap and use target table B as lookup (with inner join).
Set the "Catch lookup inner join reject" to true and use this output to directly insert into the target table.
Hope this helps.
(unable to delete 4th image - 2nd and 4th are same)
One Star

Re: how to delete and insert specific row in table using talend

Hi, Bkar81
Thanks for your helps. Most appreciate it. Smiley Happy

Thanks & Regards,
Isma