'Flipping' Element and Alias in Accounts Dimension
Posted: Tue Dec 22, 2009 4:15 pm
We have an accounts dimension that has
Element - AccountDescription eg 'Cost of Sales' (Technically speaking the 'Principal Element' )
Alias - AccountCode eg '501600'
We wish to flip the dimension so we have
Element - AccountCode
Alias - AccountDescription
As far as we can see there obvious repercussions in that
1. All cubes that reference this dimension will have to be re-created (dumped or re-ETL'ed)
2. All rules that reference this dimension will have to have the accountcode substituted for the accountdescription.
3. All TI processes that reference this dimension will have to be recoded with the correct primary element name.
Looking away from these repercussions and simply concentrating on the practicalities of 'flipping' the actual dimension.
We have a multilevel hierarchy in our account structure with several alternate hierarchies for example
Here stock provisions is part of the trial balance structure but is also part of another structure where we look at provisions as a whole.
My plan is to dump and reload the dimension using the follow pseudo code:
Once the sequel table is written out it will be a simple matter of maintaining the output order and then reinputting the dimension with a very simple TI process. (It could be a flat file but sequel table will allow any other manipulation that might arise).
Now I am sure this will work but I have a few questions to ask to the more experienced TM1'ers out there:
1. Is there an easier way of doing the flip?
2. Are there any pitfalls in flipping that people have encountered on their TM1 travels?
3. Is recursion as required by output_hierarchy possible in TI?
Thanks to all on forum so far. All responses gratefully received and acknowledged.
Element - AccountDescription eg 'Cost of Sales' (Technically speaking the 'Principal Element' )
Alias - AccountCode eg '501600'
We wish to flip the dimension so we have
Element - AccountCode
Alias - AccountDescription
As far as we can see there obvious repercussions in that
1. All cubes that reference this dimension will have to be re-created (dumped or re-ETL'ed)
2. All rules that reference this dimension will have to have the accountcode substituted for the accountdescription.
3. All TI processes that reference this dimension will have to be recoded with the correct primary element name.
Looking away from these repercussions and simply concentrating on the practicalities of 'flipping' the actual dimension.
We have a multilevel hierarchy in our account structure with several alternate hierarchies for example
Code: Select all
1. Stock Provisions
net assets - total assets - inventory - stock and WIP Provisions - stock provisions
2. Stock Provisions
all provisions + stock provisions
|
+ liability provisions
My plan is to dump and reload the dimension using the follow pseudo code:
Code: Select all
Procedure Main
Forall hierarchy_starts (ie loop through dimension finding elements without parents )
write dummy parent AccountCode AccountDescription, child AccountCode AccountDescription to sequel table with weighting and all other attributes of child
call output_hierarchy(hierarchy_start)
Endfor
Procedure output_hierarchy
Count number of children
if childrencount = 0 then
return
else
Forall children
write parent AccountCode AccountDescription, child AccountCode AccountDescription to sequel table with weighting and all other attributes of child
call output_hierarchy(child)
Endfor
Endif
Now I am sure this will work but I have a few questions to ask to the more experienced TM1'ers out there:
1. Is there an easier way of doing the flip?
2. Are there any pitfalls in flipping that people have encountered on their TM1 travels?
3. Is recursion as required by output_hierarchy possible in TI?
Thanks to all on forum so far. All responses gratefully received and acknowledged.