Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
We are bringing in Oracle table with 500,000 rows containing various Oil Products information. Oil Products are grouped into Edible oils, medicines, hair oil, massage or facial oils etc..
Every Oil in a group is uniquely identified with Oil_Product_ID. For example, OO1 = Olive oil, AO1= Almonds, FO1 =Fish oil etc.. And all groups have their own Group_ID EO = Edible Oil, HO = Hair Oil and etc.. So, a product is uniquely identified by combining Group_ID and Oil_Product_ID.
One of our client gave us an exception list, where they want 300 out of 500,000 oils to be marked as different group irrespective of what we have in our database. For example, 300 of edible oils into Hair oil group. He also supplied us with IDs of all those 300 products.
What's an efficient way of doing this?
A way I can think of is:
1. Load the 300 IDs you need to override from the database into a mapping table. I suppose you have FromID and ChangeToID fields in this table.
2 In the load script, use the Apply Map function as follows ApplyMap('Map_Oils', Oil_ID)
This way, if the apply map function finds any overridable ID, it will change it. If it does not find anything in the mappting table, it should return the original Oil_ID value.
I suggest, for validation purposes, keeping the original field as is with a different name.
Hope this helps.
Mike.
A way I can think of is:
1. Load the 300 IDs you need to override from the database into a mapping table. I suppose you have FromID and ChangeToID fields in this table.
2 In the load script, use the Apply Map function as follows ApplyMap('Map_Oils', Oil_ID)
This way, if the apply map function finds any overridable ID, it will change it. If it does not find anything in the mappting table, it should return the original Oil_ID value.
I suggest, for validation purposes, keeping the original field as is with a different name.
Hope this helps.
Mike.