Four Stars

Upsert using Action on data in the tDBOutPut component

Hi, 

I am new to Talend and am trying to achieve the following: 

I have a table which has a key value (auto generated). It receives a null value (for the auto generated values). My data also contains the ID value which is the business key. I want to create a job which will do an upsert according to the business key (the ID column). The insert part is working (it is not writing any records a record with the ID already exists) however the update part is not working. What do I need to do in order to make it update the values according to a business key? 

 

Screen Shot 2018-05-03 at 5.42.20 PM.pngScreen Shot 2018-05-03 at 5.42.39 PM.pngScreen Shot 2018-05-03 at 5.42.56 PM.pngScreen Shot 2018-05-03 at 5.43.14 PM.png

3 REPLIES
Nine Stars

Re: Upsert using Action on data in the tDBOutPut component

If Key attribute is auto generated value then remove that attribute from component and try to run job.

 

Regards,

Veeru Boppudi
Four Stars

Re: Upsert using Action on data in the tDBOutPut component

vboppudi great thanks! worked like magic!

 

Do I need to keep the key definitions on the Business key? 

Nine Stars

Re: Upsert using Action on data in the tDBOutPut component

If you are updating any data in target table yes you need to keep key on business Key.

 

Regards,

Veeru Boppudi