Page 1 of 1

TI code to break the Parent-Child relationship in dimension

Posted: Wed Apr 03, 2013 5:29 am
by sreesuku
Hi,

Can anybody give me a TI code to break the Parent-Child relationship in a dimension, so that I can directly update the dimension.

Eg : I have Employee dimension with hierarchy Locations --> Employees.
I want to update the dimension using the latest employee file. I don't want to 'Recreate' since the new file may not contain some employees who were part of the Employee dimension earlier. If I directly update, an employee with a 'changed' location in the new file may come under 2 locations (So values may get doubled up during data loading)

So If we can break the parent child relationship, then I can directly update the dimension without duplicating employees.
I have heard from somebody that such a code can be written, any help ?

Regards
Sree

Re: TI code to break the Parent-Child relationship in dimens

Posted: Wed Apr 03, 2013 5:45 am
by lotsaram
Your question has come up before so you may find the solution by using the forum search function (top right of every page) or using Google.

If you can't resolve your issue after using the search tool please re-post including details of posts that your searches brought up and some background on how your issue differs from the issues covered in the existing posts.
- - - - - - - - -
Using search you don't have to go very far, e.g. this post by Martin only yesterday! http://www.tm1forum.com/viewtopic.php?f ... 870#p39870
... and you can always use the Bedrock UNWIND process.

Re: TI code to break the Parent-Child relationship in dimens

Posted: Wed Apr 03, 2013 11:24 am
by rmackenzie
Lotsa, I don't disagree with your response, but it occurs to me that the OP is still in developing in the wizard and hasn't fully realised that (s)he will have to write custom code in the 'Advanced' section to achieve the outcome.
sreesuku wrote:Can anybody give me a TI code to break the Parent-Child relationship in a dimension, so that I can directly update the dimension
The information in Lotsaram's post will get you where you need to go. However, the core function that is required is DimensionElementComponentDelete. I suggest you research its usage and then delve into the links that Lotsa provided.