Sunday, 25 January 2009

ODI Series – The final installment

Well here it is the end of a journey through the world of the data integrator, I say the final part but there will be more blogs in the future covering anything that I come across that is useful and needs to be shared.

Today I will be looking at scheduling your integrations using the Operator and also how to execute them over the web using the java invocation API.

Ok, you have your integration all up and running though you want to be able to run it on a scheduled basis, this is how it is done.

The first thing that needs to be done is to create a scenario; the scenario compiles all the elements of your integration ready to be executed. A scenario can be created from an interface, package, procedure or variable, for this example I am going to use a previously created package.

There are a couple of ways of generating a scenario, you can right click over your component and choose “Generate Scenario”



Or open the component, go to the scenarios tab and generate



If it is a package you are scheduling and it contains variables you will be presented with the option to be able set the value when the scenario is executed.



If you execute the scenario then the session variable window will open where you can enter the value for the selected variables



If you change the component such as a package in any way you will need to regenerate the scenario again to compile it with the changes, this can easily be done from the right click menu.

Right clicking the scenario also gives the option to schedule.



This will open the scheduling window that has a multitude of options to suite your requirements



There is also a variables tab to let you set what the initial value of the variables will be; once these parameters have been set and applied they will be sent to the operator.

Opening the operator and selecting the Scheduling tab will display the information about all the scheduled scenarios.



You can also schedule the scenarios directly from the scenarios section in the Operator and that’s all there is to it, couldn’t be easier.

If you want to execute a scenario from a Java application or over the web then one way of doing this is to use the provided invocation java package.

Within the ODI directory installation (\OraHome_1\oracledi\tools\web_services) there is a file name odi-public-ws.aar, the file is a aar type which stands for Apache Axis Archive, axis is Apache’s java platform for creating and web services applications which I am not going to be going into today.
What I am interested in is inside this file, in the lib directory is the java archive package odi-sdk-invocation.jar.



Once the file has been extracted from the aar file then you are ready to use it in with your Java IDE of choice.

The API documentation is available at \OraHome_1\oracledi\doc\sdk\invocation\index.html
One thing to be aware of is that you need to have an agent created to use the API with the example I am going to show, I went through the agent setup in an earlier blog

First create a new instance of the OdiCommandScenario object and set the scenario and context information.



If it is a package and has variables associated with it you can also set them.



You can also set whether scenario is executed in synchronous mode (waits for the scenario to complete executing) or asynchronous mode (executes scenario and returns).



Next is to use the OdiRepositoryConnection object.



There are a number of JDBC connection methods but these are not needed if using the scheduler agent.

With all the parameters set the odiInvocation object can be initialized with the host name and port of the agent.
If the java is going to be executed on the same machine as the ODI agent and if using port 20910 then it can be initialized without any constructors.

The invokeCommand method can then be used passing in the connection and scenario objects to execute the scenario.



Executing the scenario will return an odiInvocationResult object, the isOk method returns true or false depending on the request be successful or not.
It is also has a method - getSessionNumber which returns the session id of the executed scenario

So there we have a really simple example of executing a scenario using the Java API, now if we want to run this from the web then it can be easily transferred to a JSP script.



Yes, it’s very basic and only runs a specific scenario then outputs the session id if it was successful but the script can be updated in many way like using dropdowns to select the scenario.

With a bit of work here is an example of what is possible combining JSP, Java classes & Ajax :- Have a look Here

Well that completes the ODI Series, I believe I have covered the most important aspects of ODI and integrating it with planning and essbase. I know the series has proved quite popular and I am glad it has helped people starting out with ODI.

OK, what next ….

8 comments:

Anonymous said...

Somehow the values entered for the variables in the popup that appears when a scenario is executes is not available in the package.

I tried all combinations, the value set initially as default value is the one is present.

ODI version used : 10.1.3.5

Anonymous said...

Great posts. The whole series is very helpful. ODI is very new to me, I have worked with OWB quite a bit, and I'm trying to create some ETLs/ELTs. I've been able to do all the joins, filters and functions within scenarios but I cant figure out how to take a source table, do a 'group by' and then load it into a target table... if you know how to do it, any help would be appreciated.

123 said...

素食餐廳 交友 婚友 婚友社 婚友聯誼 愛情公寓 相親 相親銀行 聯誼 命理網 姓名學Hook and Loop 婚禮佈置 情人花束 新竹花店婚友聯誼社 愛情會場佈置 氣球佈置二手車健檢 醫學美容 淨膚雷射 汽車美容 法拍屋 水餃 清潔公司 塑膠袋批發 塑膠袋工廠 實驗動物 到府坐月子 坐月子 坐月子中心 坐月子餐 孕婦 月子餐 到府坐月子 中古車 今日金價 坐月子中心 坐月子中心台中 坐月子中心台北 台北人力銀行

123 said...

金價查詢 月子餐 月子中心 坐月子餐 月子餐外送 月子餐食譜 統一發票9 10月 金價 統一發票9 10月 找工作 統一發票7 8月 求職 1111求職人力銀行 104求職人力銀行 104人力銀行 統一發票5 6月 104人力銀行 104求職人力銀行 塑膠袋 統一發票1 2月 金價 黃金價格 金價查詢 黃金買賣 環保袋 肉毒桿菌 黃金 統一發票3 4月 坐月子 sum中古車 1111人力銀行 104求職人力銀行 1111人力銀行求職 黃金價格查詢 中古車買賣 塑膠袋 統一發票9 10月 塑膠袋批發 中古車 中古車買賣消防公司 地板施工 網路廣告 網路行銷

123 said...

網路行銷食品批發 拉麵 T恤 慈善 店面租賃 店面出租 店面出售 花茶 花草茶 肝癌 健康檢查 身體檢查 飛梭雷射 雷射溶脂 直航機票 養生茶 招牌 led招牌 招牌製作 美國月子中心 保養 美國月子中心 美國月子中心 團體服 OBU 投審會 會計師事務所 會計師 工商登記 彌月蛋糕 公司登記 保時捷 法拉利 福利 <包子 肉粽 宅配美食 四神湯 搬家公司 訂房網花東旅遊 桃園土地 桃園房屋仲介 桃園房屋 桃園房屋網 桃園房屋買賣

123 said...

馬桶 馬桶不通 國外旅遊 國外機票 團體旅遊 直航機票 簽證熱水器 蘭花 化糞池 抽化糞池 便宜機票 國內旅遊 抽水肥 太陽能 水管不通 洗水塔 消毒 通水管 通馬桶 馬桶 馬桶不通 上順旅行社 五福旅行社 大興旅行社 天喜旅行社 天福旅行社 日本旅行社 日本旅遊 日本機票 日本自由行 日本訂房 包通 抽化糞池 抽水肥 水管不通 洗水塔 自由行 訂房 雄獅旅遊 汽車美容 汽車美容 三久太陽能黃金價格查詢 貸款 信用貸款

123 said...

漆彈 搬家公司 會場設計紙盒訂裝 展覽設計展場設計 展覽設計 消防設備 消防設備 機電 崴立機電 牙齒美白 植牙 牙周病治療方法 植牙費用 牙周病 光纖美白除毛 肉毒桿菌除皺 紙盒印刷 紙袋包裝 當鋪 當舖 借錢 手提紙袋 紙袋工廠 包裝紙袋 手提袋 包裝盒 股票教學 股市分析 股市億萬贏家 股票軟體 股票行情 ferrari 賣車 賓士 lexus紙袋印刷 會場設計 貸款 票貼 二胎 包裝紙盒融資 工商融資 支票貼現 借款 微晶瓷 3D飛梭雷射 淨膚雷射 汽車借款 汽車貸款 徵信 徵信社 外遇 彌月送禮 喜餅

123 said...

彌月 離婚 獸醫院 寵物住宿 白內障 心絲蟲 腎衰竭 狗皮膚病RF PCB Rigid-Flex PCB 動物醫院 洗鞋店 加盟 洗鞋 洗包包 洗鞋加盟 酒店式公寓旅行社slot machine manufacturer 杭州旅遊北京自由行上海自由行旅遊網律師
台北民宿 房屋仲介 法拍屋 法拍 法拍屋查詢系統板橋法拍屋 大台北法拍屋 原裝進口燈飾 流行燈飾 3D立體印刷 印刷服務回收 照明 彩盒 回收電腦 水晶燈 日租套房 台北日租 apartment 太平山民宿 宜蘭民宿推薦 法律事務所