I am trying to read data from XML File and insert/update to the oracle database table.
My Scenario as per the image shared give below:
From the XML Adapter Side I have to make a combination of ID and Name field from read side and search it with combination of oracle adapter table ID and Asset_ID at write side. if the Search criteria matches then for that corresponding record the thickness value from read side can we add or update to MAWT column at write side.
Please let me know what adaptor or control structure I need to use, an it will be helpful if u can attach a sample which will be helpful of all other users as well.
I suppose you want to detect whether a row is already inserted and in this case FlowHeater should perform an UPDATE and if not FlowHeater should perform to INSERT a new row.
FlowHeater can handle this automatically! You just have to enable both option “insert data” and “update data” in the
on the WRITE side (see Screenshot).
In order to check a combination of two fields (not only the table based primary key) you just have to switch on the “Primary Key” option for the second field “Asset_ID” on the “Fields and Data types” tab (see Screenshot).
With this settings the
checks automatically based on the fields “ID” and “Asset_ID” whether a row exist and perform an update or insert.
1.if ID and NAME are not null values and matches to the Write Side, then data need to be updated.
2.if ID and NAME are not null values and not matches to the Write Side, then data need to be inserted.
3.if ID and NAME are null values or either one null, then we don't want to list out that row in the scripts for insert.
I´ve just modified the Definition with 2
Condition to filter the them when be a null value. The Defintion decides automatically whether an INSERT or UPDATE is necesarry, it should work for your purpose.