"Using multiple id to update database"
When using"Update Database"operator, there is a description for "attribute filter type" says:
subset: This option allows the selection of multiple id attributes throught a list ...
My question is how to set multiple id attributes using"set role"operator, i have two attributes(machine_id & time_stamp) to set as id in order to update my orginal DB table, however,"set role"operator always keep lastest one attribute as id not both. Is there any way to set multiple attribute, or i misunderstand the description above?
by the way, i've tried using user define attribute set machine_id as id_1, time_stamp as id_2, but didn't work on"Update Database"operator, it will be recognized as different row.
Here is the operator.
<运营商激活= " true " class = "过程”兼容ibility="8.0.001" expanded="true" name="Process">
<参数键= " target_role " value = " id " / >
Appreciated,
Ray Jhong
Answers
Hi@RayJhong,
roles are unique. it is only possible to set each role once. However, if you choose more than one attribute in the selector of Update Database, it will take them for the update in the DB. This is independent of roles (except for the include special).
Best,
Martin
Dortmund, Germany
Hi@mschmitz
Thank you for quick reply, i've tried choosing both attribute as selector but got wrong result as below:
Result seems like it didn't treat Machine_ID & Time_Stamp as keys to update Failure, instead, it became a new row.
Hi,
have you tried "Include Special Attributes"? Otherwise, specials of your selection are ignored. Not very intuitive in this operator, but this is how it works.
Best,
Martin
Dortmund, Germany
Hi@mschmitz
The same result. and i also tried remove"set role"operator to prevent any special attribute to be excluded but nothing changes. Is is possible for you to reproduce my situation? here is the process:
And datasource is inSamples/Templates/Predictive Maintenance/reference data一个time_stamp capturing current date time.
Sincerely,
Ray Jhong