Seven 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.

 

 

Tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
Moderator

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

Hi,

The work flow should be:

Target DB-->tMap(make inner join on your inputs and set the "Catch lookup inner join reject" as true)-->output

Source DB-->
The output will be the changed data.

The workflow is not very clear for you?

Please take a look at my screenshots for details

comparetables1.pngcomparetables2.pngcomparetables3.pngcomparetables4.png

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.
3 REPLIES
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.
Four Stars

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

Hi,

 

@xdshi Could you please provide a ss for the solution you suggested.

Moderator

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

Hi,

The work flow should be:

Target DB-->tMap(make inner join on your inputs and set the "Catch lookup inner join reject" as true)-->output

Source DB-->
The output will be the changed data.

The workflow is not very clear for you?

Please take a look at my screenshots for details

comparetables1.pngcomparetables2.pngcomparetables3.pngcomparetables4.png

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.