Friday, 21 November 2008

ODI Series - Planning and multiple UDAs

I thought I would post a quick blog about loading multiple UDAs in planning with ODI, if you have used HAL in the past then you probably already know but I have seen the question asked a few times, I am also going to demonstrate how to load UDAs from a multi column source.



In the example above I have two UDAs that I can use and say I want to apply them both to one member using ODI then the answer is very simple, in your source all you need to do is separate each UDA with a comma.



The thing to remember if you are using a csv flat file as the source is that the UDA details will be enclosed in quotations as they contain a comma



This means that in your flat file source DataStore you will need to add in the text delimiter into the configuration.



In your interface just map the UDA and you are done.



And in planning it should of applied both UDAs to the member properties.



So what if you have a source that has separate fields for each UDA, the fields for each record will not always be populated e.g.



Now because you need to separate each UDA with a comma you can’t apply the standard logic and just concatenate the fields, if you did then you would have something like.

Record 1 – UDA = “ODI_UDA1,ODI_UDA2”
Record 2 – UDA = “ODI_UDA1,”
Record 3 – UDA = “,ODI_UDA2”

If you tried to load them into planning records 2 & 3 would fail.

To get around this is in ODI you need to create an expression on the target.



Click the “Launch Expression Editor” icon.



The following functions are going to be used

CASEWHEN(<condition>, <truepart>, <falsepart>)

LENGTH(<string>)

CONCAT(<string1>, <string2>)

To try and put it into words what we are trying to achieve is :-

Case 1 - If the length of the value in UDA1 is greater than zero and the length of the value in UDA2 is greater than zero then concatenate UDA1 with a comma and UDA2.

e.g. ODI_UDA1, ODI_UDA2 will equal “ODI_UDA1,ODI_UDA2”

CASEWHEN(<condition>,

The condition equals LENGTH(ACCOUNT.UDACOL1)>0 AND LENGTH(ACCOUNT,UDACOL2)>0

So now we have CASEWHEN(LENGTH(ACCOUNT.UDACOL1)>0 AND LENGTH(ACCOUNT,UDACOL2)>>0,

The <truepart> can be expressed by

CONCAT(CONCAT(ACCOUNT.UDACOL1,','), ACCOUNT.UDACOL2),

The <falsepart> is defined by looking at the next possible combination of UDAs.

Case 2 - If the length of the value in UDA1 is equal to zero and the length of the value in UDA2 is greater than zero then use the value in UDA2.

e.g. “<blank>,ODI_UDA2” will equal “ODI_UDA2”

We will need to use CASEWHEN( again there are more possible combinations

<condition> is LENGTH(ACCOUNT.UDACOL1)=0 AND LENGTH(ACCOUNT.UDACOL2)!=0,

<truepart> equals ACCOUNT.UDACOL2

Once again the <falsepart> is defined by looking at the next possible combination of UDAs

Case 3 - If the length of value in UDA1 is greater than zero and the length of the value in UDA2 is zero then use the value in UDA1.

e.g. “ODI_UDA1,” will equal “ODI_UDA1”

Final time to use CASEWHEN(

<condition> is LENGTH(ACCOUNT.UDACOL2)=0 AND LENGTH(ACCOUNT.UDACOL1)!=0

<truepart> equals ACCOUNT.UDACOL1

<falsepart> will be defined by

Case 4 - Don’t use any value, which can easily be represented by ‘’

If we put it all together this produces



And that’s it, this works quite well in situations where you only have a few UDAs to play with though if you have quite a lot I would recommend trying to find an alternative solutions

Next time I will be looking at loading data into essbase using ODI.

7 comments:

Toby said...

Are you sure you don't want to come to Australia?

123 said...

喇叭網 金屬擴張網Plastic injection Mold developmentInjection Mold Plastic injection molding Injection molding ISO9001認證 射出成形 塑膠製成品塑膠模具設計 模具開發 精密射出 縫衣機塑件Industrial PCB Heavy Copper PCB Microwave PCB Medical PCB 膠框創業 加盟 早餐店加盟 meat processing equipment food processing mixers 化糞池 通馬桶
導光板 化妝品盒 藥盒 燈具 禮盒 印刷供應商 彩色盒 禮盒 設計 網版印刷 紙盒工廠 印刷公司

123 said...

宜蘭民宿 宜蘭住宿 網路訂房 宜蘭飯店 新娘祕書 清潔公司 植牙 裝潢 室內設計 油漆粉刷 油漆工 油漆工程 洗鞋加盟 洗包包加盟 洗包包 創業加盟店 早餐店加盟 開店創業 創業開店 結婚金飾 鑽石婚戒 通水管 通水管 通馬桶 抽水肥 包通 馬桶不通 通馬桶 通水管 清水溝 沙發 室內設計公司 室內設計 室內裝潢設計 裝潢設計 澳門自由行 搬家公司 搬家公司 台北搬家公司 新竹搬家公司 桃園搬家公司 香港自由行太陽能熱水器 三久 櫻花牌熱水器

123 said...

seo 網站設計 超耐磨地板 店面出租 乳癌 全身健康檢查 自由行 三久 太陽能 三久太陽能 太陽能熱水器 環保袋 慈善基金會 慈善機構 租辦公室 租店面 買辦公室電波拉皮 hand dryer 電波拉皮 雷射溶脂 肉毒桿菌 系統家具 台中漆彈場 漆彈 團體服 團體服 團體服 T恤 圍裙 網路行銷 中古車 涼麵 POLO衫 班服 團體服創意 熱轉印 團體服訂做 宜蘭民宿 關鍵字廣告 seo seo 線上客服 seo 網頁設計 seo 網頁設計公司

123 said...

熱水器 省電熱水器 衛浴設備 節能減碳 電熱水器 中古車 義賣 義賣活動 二手車 環保袋 環保袋 環保袋 十分瀑布 台北旅遊網 月子餐 飛梭雷射 太陽能熱水器 太陽能 三久太陽能 三久 身體檢查 健康檢查 台北民宿 平溪 景觀餐廳 薰衣草花園 花園餐廳 螢火蟲 渡假村 鐵道之旅 團體服 滷味 滷味加盟 滷味批發 滷味食材 滷味宅配 滷雞翅 滷雞腳 健康滷味 魯味 加盟創業 慈善慈善機構 公益彩券

123 said...

健康食品 慈善基金會 公益團體 愛心捐款 捐款 美白 皺紋 減肥 禿頭 醫學美容 電波拉皮 雷射溶脂 肉毒桿菌 玻尿酸 痘疤 婦產科診所 室內設計 埋線 內分泌失調 黃體不足 針灸減肥 坐月子中心 婦產科 月子中心 全身健康檢查玫瑰花束 盆栽 網路花店 花店 鍛造 樓梯扶手 欄杆 鐵門 採光罩 清水溝 通水管 通馬桶

123 said...

房屋貸款 剖腹生產 姓名配對 星座 星座運勢 算命 素食料理 素食水餃 開運印章 風水 外遇 徵信 壁癌 屋頂防水 屋頂隔熱 抓漏 油漆 徵信社 外遇 徵信 徵信社 外遇 徵信 徵信社 外遇 徵信 徵信社 外遇 徵信 徵信社 外遇 徵信 徵信社 清潔公司浴室 漏水 舊屋翻新 裝潢 防水工程 壁癌 健康飲食 台北素食餐廳 吃素 團購美食 水餃 素食素食食譜