Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Labels (2)
2 Replies
bkar81
Contributor III
Contributor III

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)
0683p000009MDCg.png 0683p000009MDLw.png 0683p000009MDM1.png
Anonymous
Not applicable
Author

Hi, Bkar81
Thanks for your helps. Most appreciate it. 0683p000009MACn.png

Thanks & Regards,
Isma