Six Stars

insert/update into destination table only those records which are updated/ or are new records.

Hi,

 

Please refer below screenshot, I want a way to 

insert/update into destination table only those records which are updated/ or are new records.

Capture.PNG

I have joined all columns in Tmap to compare.

Main flow is the latest data received  and lookup is old Table data, which whom we will compare.

 

i get the updated/ inserted records using inner join out put reject.Check tLogrow2 which has 2 rows out of one is new row and one is updated.

 

Now i need to update the source Table with updated row and delete old one and insert newly added record  which in my example are in  tLogrow2

 

Can you please guide me how to proceed.

 

Thanks in Advance.

 

 

  • Data Integration
Tags (3)
1 REPLY
Moderator

Re: insert/update into destination table only those records which are updated/ or are new records.

Hi,

If you want to capture the changed data and only load these changed data into target table to achieve table sync, you can compare tables by using tMap.
The work flow should be:

Target DB-->tMap(make inner join on your input and set the "Catch lookup inner join reject" as true)-->output
 Source DB-->
The output will be the changed data.
 
With Talend Subscription Solution, there is a CDC (Change Data Capture) feature which can achieve data sync.

Best regards

Sabrina
 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.