- Posts: 4
Data Migration from XML To Oracle using key value pair
- rajat kumar barik
- Topic Author
- Offline
- User
Less
More
6 years 6 months ago #3431
by rajat kumar barik
Hello Sir,
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.
Thanks for your time.
Data Migration from XML To Oracle using key value pair - Post(3431) was created by rajat kumar barik
Hello Sir,
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.
Thanks for your time.
Attachments:
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
6 years 6 months ago #3432
by FlowHeater-Team
Best wishes
Robert Stark
Replied by FlowHeater-Team on topic Data Migration from XML To Oracle using key value pair - Post(3432)
Hi Rajat,
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 Oracel Adapter 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 Oracel Adapter checks automatically based on the fields “ID” and “Asset_ID” whether a row exist and perform an update or insert.
Atteched you´ll find a brief example.
Oracle insert or update
Key combination
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 Oracel Adapter 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 Oracel Adapter checks automatically based on the fields “ID” and “Asset_ID” whether a row exist and perform an update or insert.
Atteched you´ll find a brief example.
Oracle insert or update
Key combination
Best wishes
Robert Stark
Attachments:
Please Log in or Create an account to join the conversation.
- rajat kumar barik
- Topic Author
- Offline
- User
Less
More
- Posts: 4
6 years 6 months ago - 6 years 6 months ago #3433
by rajat kumar barik
Replied by rajat kumar barik on topic Data Migration from XML To Oracle using key value pair - Post(3433)
From the Read Side,
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.
How can we achieve the 3 number scenario.
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.
How can we achieve the 3 number scenario.
Last edit: 6 years 6 months ago by rajat kumar barik.
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
6 years 6 months ago #3434
by FlowHeater-Team
Best wishes
Robert Stark
Replied by FlowHeater-Team on topic Data Migration from XML To Oracle using key value pair - Post(3434)
Hi Rajat,
I´ve just modified the Definition with 2 Filter Heater and IF-THEN-ELSE Condition to filter the them when be a null value. The Definition decides automatically whether an INSERT or UPDATE is necesarry, it should work for your purpose.
NULL value filter condition
I´ve just modified the Definition with 2 Filter Heater and IF-THEN-ELSE Condition to filter the them when be a null value. The Definition decides automatically whether an INSERT or UPDATE is necesarry, it should work for your purpose.
NULL value filter condition
Best wishes
Robert Stark
Attachments:
Please Log in or Create an account to join the conversation.
Time to create page: 0.287 seconds