There are three methods to be able to extract data from essbase; these are using either a Calc script (9.3 onwards), Report script of an MDX query. If your essbase db is BSO then you will be able to use all of the methods, if it is ASO then you will only be able to use the report script or MDX query.
I will first tackle the Calc script method; this method is probably my least favourite due to the way it operates. You first have to create a calc script using the DATAEXPORT function that will extract to a text file.
The DATAEXPORT function writes a dense dimension as the columns so you have to decide how you want your data to look, as it will need to be matched against how you reverse the essbase database in ODI. I am using the Sample.Basic db and have decided to use the Scenario as the dense dimension for the columns.

It is important to use :- DataExportDimHeader On;
As ODI will consider the first 2 records to be header information, the extract file will also have to write to location which will be accessible by ODI, this is not so bad if ODI is on the same server as essbase but becomes more of an issue if they are separate, one of the reasons I am not so seen on this method.
Running the calc script produces the following output :-

First a new model needs to be inserted in the ODI designer, I am assuming you have set up the connection to essbase in the topology manager, if you have not then have a then have a read of a previous blog

In the reverse section, select the context and the logical agent, the KM to use is “RKM Hyperion Essbase..”
To be able to return the correct data columns the KM options have to be updated.
MULTIPLE_DATA_COLUMNS – Set to “Yes” as our exported data has multiple columns.
DATA_COLUMN_DIMENSION – Set to “Scenario” as this data dimension in the exported data file
DATA_COLUMN_MEMBERS – Set to “Actual,Budget,Forecast” as these are the members in the exported data file.

Reversing the cube produces

You will notice the members Actual,Budget & Forecast have been generated in the data DataStore.
The next step is to create a DataStore that will be the target for the exported data; I am going to use a SQL server database table as the target as I couldn’t really see the point of running a calc script to export to a text file and then generating another text file from the export.

I just ran a selective reverse on an existing model to retrieve and store the database table as a DataStore


With the source and target DataStores created the next stage is to create the interface.
As usual the interface was named, the context chosen and the staging area set as Sunopsis Memory Engine.
In the diagram tab the Sample_BasicData DataStore was dragged to the source and SampleDataExtract DataStore to the target as all the columns are the same name everything was auto-mapped.

Within the flow area the LKM to use is “LKM Hyperion Essbase DATA to SQL”
The Options are important to get correct.
EXTRACTION_QUERY_TYPE :- Three possible types CalcScript, MDXQuery or ReportScript, you will need to manually enter the type if you are not using the default ReportScript.
EXTRACTION_QUERY_FILE :- This is the location of the file that will be run to extract the data from essbase, so obviously three file types. For the CalcScript you can enter the fully qualified location of the file or if it resides in the essbase app directory you can just type the name of it without the file type suffix.
For example :- E:\FileStore\extract.csc or extract
EXT_COL_DELIMITER :- this is the columns delimiter that is being used, in my example the calc script is creating a comma delimited file so I just enter ,
EXTRACT_DATA_FILE_IN_CALC_SCRIPT – This only applies if you are using the query type of CalcScript, it is the location of the file created by the calc script., this file must be accessible by ODI.
The other options are self-explanatory and have been covered previously.
The IKM I used was “IKM SQL to SQL Append” with the option of “DELETE_ALL” so the table is cleared out each time the interface is run.

When I ran the interface for the first time it failed with the error:-
Extraction using calculation script is not supported for essbase versions prior to 9.3
I am using version 11.1 and have encountered this error previously when loading metadata into essbase, there are currently no updated versions of the Java files so even though Oracle are pushing to use ODI it is not fully compatible with 11.1.
I wasn’t going to leave it there so tracked down the Java class that generates the error, it is in ODIEssbaseDataReader.class

I updated and compiled the class to not use logic for versions greater than 9, after putting the compiled class back into the jar package the interface ran through without a problem.
What happens when the interface is executed is ODI will run the specified calc script, the calc script will output to a text file, once the export is complete ODI will then load the text file into the database table.

Ok, onto the next type of extraction method Report Script, first step is to create the report script.

Make sure you use the commands {SUPALL}{TABDELIMIT}{ROWREPEAT}{NOIDENTGEN} these will format the output in the way ODI can interpret.

I am going to use the same interface as used in the Calc Script method so I wrote the report to replicate the same output.
In the interface I had to set the options
EXTRACTION_QUERY_TYPE – ReportScript
EXTRACTION_QUERY_FILE – extract or you can put in the fully qualified file path if it is not part of the essbase database.
EXT_COL_DELIMITER - The report is tab delimited so \t is used.

The final method that can be used is an MDX query; I am going to use the same interface so I once again wrote the script to output the script in the same format.

I am sure the MDX could be wrote in different ways but for this exercise it produces the desired results.
In the interface I updated the options
EXTRACTION_QUERY_TYPE – MDXQuery
EXTRACTION_QUERY_FILE – This has to be the fully qualified name of the MDX script
EXT_COL_DELIMITER – MDX output is tab delimited by default so \t was used.

So there we have it a brief look into the different ways you can extract data from essbase, each one has its own merits and drawbacks.
That concludes looking at what can be done with the KMs for essbase and planning, next I am going to move onto the other areas of interest in ODI such as packages and variables.

11 comments:
When I create a text filed from Essbase using a calc script command: DATAEXPORT, it generates a character at the end of each record. ODI complains reading that character. I have to open the file in wordpad and save the file to remove the characters and it then loads fine from ODI
hi john, could you please explain the merits and drawbacks of each extraction method? It will be a useful information for us. Thx
Important thing to add if you are going to use extraction with CalcScript:
For extracting data using calculation script, the Essbase server and the Oracle Data Integrator
Agent must be running on the same computer.
Hi John..
I feel its hard to edit and recompile ODIEssbaseDataReader.class. Do you decompile ODIEssbaseDataReader.class and all the library (including iterated library)? it's hard to do. How is the easiest way to recompile ODIEssbaseDataReader.class?
Well, I'll thank's if you give me the compiled ODIEssbaseDataReader.class (or the odihapp_essbase.jar).. :)..
thank's before. This is my email address : yunianto_k@yahoo.co.id.
I thought the post made some good points on extracting data, I use python for simple extracting data,data extraction can be a time consuming process
but for larger projects like files, the web, or documents i tried "extracting data from the web" which worked great, they build quick custom screen scrapers, extracting data, and data parsing programs
素食餐廳 交友 婚友 婚友社 婚友聯誼 愛情公寓 相親 相親銀行 聯誼 命理網 姓名學Hook and Loop 婚禮佈置 情人花束 新竹花店婚友聯誼社 愛情會場佈置 氣球佈置二手車健檢 醫學美容 淨膚雷射 汽車美容 法拍屋 水餃 清潔公司 塑膠袋批發 塑膠袋工廠 實驗動物 到府坐月子 坐月子 坐月子中心 坐月子餐 孕婦 月子餐 到府坐月子 中古車 今日金價 坐月子中心 坐月子中心台中 坐月子中心台北 台北人力銀行
金價查詢 月子餐 月子中心 坐月子餐 月子餐外送 月子餐食譜 統一發票9 10月 金價 統一發票9 10月 找工作 統一發票7 8月 求職 1111求職人力銀行 104求職人力銀行 104人力銀行 統一發票5 6月 104人力銀行 104求職人力銀行 塑膠袋 統一發票1 2月 金價 黃金價格 金價查詢 黃金買賣 環保袋 肉毒桿菌 黃金 統一發票3 4月 坐月子 sum中古車 1111人力銀行 104求職人力銀行 1111人力銀行求職 黃金價格查詢 中古車買賣 塑膠袋 統一發票9 10月 塑膠袋批發 中古車 中古車買賣消防公司 地板施工 網路廣告 網路行銷
網路行銷食品批發 拉麵 T恤 慈善 店面租賃 店面出租 店面出售 花茶 花草茶 肝癌 健康檢查 身體檢查 飛梭雷射 雷射溶脂 直航機票 養生茶 招牌 led招牌 招牌製作 美國月子中心 保養 美國月子中心 美國月子中心 團體服 OBU 投審會 會計師事務所 會計師 工商登記 彌月蛋糕 公司登記 保時捷 法拉利 福利 <包子 肉粽 宅配美食 四神湯 搬家公司 訂房網花東旅遊 桃園土地 桃園房屋仲介 桃園房屋 桃園房屋網 桃園房屋買賣
馬桶 馬桶不通 國外旅遊 國外機票 團體旅遊 直航機票 簽證熱水器 蘭花 化糞池 抽化糞池 便宜機票 國內旅遊 抽水肥 太陽能 水管不通 洗水塔 消毒 通水管 通馬桶 馬桶 馬桶不通 上順旅行社 五福旅行社 大興旅行社 天喜旅行社 天福旅行社 日本旅行社 日本旅遊 日本機票 日本自由行 日本訂房 包通 抽化糞池 抽水肥 水管不通 洗水塔 自由行 訂房 雄獅旅遊 汽車美容 汽車美容 三久太陽能黃金價格查詢 貸款 信用貸款
漆彈 搬家公司 會場設計紙盒訂裝 展覽設計展場設計 展覽設計 消防設備 消防設備 機電 崴立機電 牙齒美白 植牙 牙周病治療方法 植牙費用 牙周病 光纖美白除毛 肉毒桿菌除皺 紙盒印刷 紙袋包裝 當鋪 當舖 借錢 手提紙袋 紙袋工廠 包裝紙袋 手提袋 包裝盒 股票教學 股市分析 股市億萬贏家 股票軟體 股票行情 ferrari 賣車 賓士 lexus紙袋印刷 會場設計 貸款 票貼 二胎 包裝紙盒融資 工商融資 支票貼現 借款 微晶瓷 3D飛梭雷射 淨膚雷射 汽車借款 汽車貸款 徵信 徵信社 外遇 彌月送禮 喜餅
彌月 離婚 獸醫院 寵物住宿 白內障 心絲蟲 腎衰竭 狗皮膚病RF PCB Rigid-Flex PCB 動物醫院 洗鞋店 加盟 洗鞋 洗包包 洗鞋加盟 酒店式公寓旅行社slot machine manufacturer 杭州旅遊北京自由行上海自由行旅遊網律師
台北民宿 房屋仲介 法拍屋 法拍 法拍屋查詢系統板橋法拍屋 大台北法拍屋 原裝進口燈飾 流行燈飾 3D立體印刷 印刷服務回收 燈 照明 彩盒 回收電腦 水晶燈 日租套房 台北日租 apartment 太平山民宿 宜蘭民宿推薦 法律事務所
Post a Comment