Rule error on dimension rebuild

Post Reply
shorsted
Posts: 33
Joined: Mon Dec 15, 2008 4:37 pm

Rule error on dimension rebuild

Post by shorsted »

Hi

I wonder if anyone has any suggestions of workarounds on an error we are getting when rebuilding a dimension?

We have an account dimension which has multiple hierarchies on it. 2 of the hierarchies come from Oracle and others are being created from manually maintained txt files. The account dimension is used in 6 cubes, 4 of which have rules linked to consolidated account elements.

Occasionally we need to rebuild the hierarchies on the dimension so we are trying to create a chore that can be run that wil refresh all hierarchies, the problem we are having is that the rebuild gives us error log files which say that there are errors with the rules - due to the elements that the rule refers to being deleted.

Ideally we would run the whole thing within one process but as the hierarchies are from different sources we do it in a number of processes. Firstly removing all consolidations, then rebuilding the oracle hierarchies and finally rebuilding the manual hierarchies. Once the consolidations have been blown away though we then get the errors on the rules

We're considering a number of options:

1. We maintain an attribute on the accounts dimension which tells us if the element is used in a rule, these elements are then changed to N elements rather than deleted at the first stage. The hierarchy rebuilds would then correct them but as the element isn't deleted we wouldn't get an error. The downside of this, is we have an additional attribute to maintain

2. We use the "RuleLoadFromFile" function to first load empty rule files into the 4 cubes and then at the end load the actual rules files back in. The downside of this is that we will need to remember to archive the original rux files via a batch file to prevent them being overwritten so that we can then reload them


I wondered if anyone had any other suggestions?

Many thanks

Sarah Horsted
User avatar
Martin Ryan
Site Admin
Posts: 1988
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: Rule error on dimension rebuild

Post by Martin Ryan »

Of those two I'd go with option two.

A third option is not to delete the elements in the first place. Rather run through and destroy the hierarchy by deleting all the consolidation relationships (but not the elements themselves) and rebuild the hierarchy later.

Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
shorsted
Posts: 33
Joined: Mon Dec 15, 2008 4:37 pm

Re: Rule error on dimension rebuild

Post by shorsted »

Thanks Martin,

I'm also thinking that option 2 might be better. If we didn't delete the elements as you suggested, we could incur problems if elements from hierarchies are removed in oracle as they would still be sitting in tm1?

Kind regards
Sarah Horsted
User avatar
George Regateiro
MVP
Posts: 326
Joined: Fri May 16, 2008 3:35 pm
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2007 SP3
Location: Tampa FL USA

Re: Rule error on dimension rebuild

Post by George Regateiro »

shorsted wrote: I'm also thinking that option 2 might be better. If we didn't delete the elements as you suggested, we could incur problems if elements from hierarchies are removed in oracle as they would still be sitting in tm1?
What we do is delete the consolidations and then readd as was suggested. Then there is a final process that collects all N level nodes that do not have a parent into a hierarchy that the users do not have access to. We do not let the hierarchy build processes delete n level nodes from TM1. Those are all reviewed by an administrator before they are deleted. Found that to be the safest way to avoid any data being lost.
ScottW
Regular Participant
Posts: 152
Joined: Fri May 23, 2008 12:08 am
OLAP Product: TM1 CX
Version: 9.5 9.4.1 9.1.4 9.0 8.4
Excel Version: 2003 2007
Location: Melbourne, Australia
Contact:

Re: Rule error on dimension rebuild

Post by ScottW »

Depending on the size of the cubes and complexity of the rules option 2 will definitely be more CPU and time intensive as it involves reprocessing all rules and feeders for the cubes.

Rather than deleting all consolidations in the account dimension I would suggest unwinding all consolidations. (break the link to all children leaving "orphan consolidations"). Then rebuild the hierarchies from all the sources, then you could run a clean-up process to delete any left over consolidations with no children. Note you won't actually need any additional attributes to do this.

However there's a caveat, which is that depending on the nature of your rules and if the consolidations used in the rules are significantly different post rebuild then you may need to reprocess feeders or some calculations might not be fed. This is probably not that likely, but you never know.
Cheers,
Scott W
Cubewise
www.cubewise.com
User avatar
Steve Vincent
Site Admin
Posts: 1054
Joined: Mon May 12, 2008 8:33 am
OLAP Product: TM1
Version: 10.2.2 FP1
Excel Version: 2010
Location: UK

Re: Rule error on dimension rebuild

Post by Steve Vincent »

I do something very similar. The way i managed it was to build a dummy dimension. I have about 6 TIs that build different parts of the hierarchy in to my dummy dim, then the final TI removes all the elements in my real dim in the prolog and copies the whole dummy dim in the metadata. As long as you do the destroy / rebuild in one TI you won't loose data and you won't cause the rule errors that you're getting.
If this were a dictatorship, it would be a heck of a lot easier, just so long as I'm the dictator.
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
Post Reply