If update... if insert ....

One Star

If update... if insert ....

Hi all,
I have a table with columns "INS" and "UP". In action on data in TDBOuput, I choose "Update or insert". But when I insert I don't want to fill UP, and on update I mustn't update INS but fill UP. Is there an easy way to do that (without triggers)?
I'm using TOS V2.1.0 with java.
Kind regards
Ben
One Star

Re: If update... if insert ....

The way I use :
I load the table I want to update and I make an inner join between this table and the source table. If it matches it's an update else it's an insert.
One Star

Re: If update... if insert ....

i have found the solution, i have one job for the insert and an other for the update.
inj the end of the insert, the update run automatically
i have deleted the pb of same name of colonnes
One Star

Re: If update... if insert ....

Ok, this solutions are not answers to the problem, they are other ways to do what talend must do with "Action On Data" feature
why it does not work?
Are Talend Offering something that doesn't work?
Employee

Re: If update... if insert ....

These feature has been add since 2.3.
Go to your db output component preoperties / advanced settings / Advanced fields option : The Updatable and Insertable columns allows you to choose which fields needs to be inserted and which fields have to be updated
Regards,
One Star

Re: If update... if insert ....

Hi all,

Can anyone explain the same thing at data model level in MDM.
In the data model I have create date and update date. For both I gave current date as default value. But when I updating the record, create date is also changing to update date. Even I updated the record, the create date rule is also working. How can I get proper dates?
Please help me out in this issue.
Thanks in advance.
Regards,
Lalitha.