}ElementAttributes Rule and TI conflict

Post Reply
kenship
Regular Participant
Posts: 194
Joined: Thu May 30, 2013 1:41 pm
OLAP Product: Cognos
Version: Planning Analytics 2.0.7
Excel Version: 2010

}ElementAttributes Rule and TI conflict

Post by kenship »

Hi,

I have a budget element dimension with different alias sets, each set represents a department. The idea is to allow different alias for different departments using the same budget element.

In the }ElementAttributes cube of the budget element, I put rules to fill the alias content from another cube.

The budget element dimension is built using a TI process and a load file. It runs from time to time as new budget element is added to the dimension.

When TI is run, the alias set will be destroyed and creates an error for the rule. I don't think I can use the viewextractskiprulevalue or cellupdateable as the whole dimension has to be rebuilt.

Can I not worry about the error message in this case?

Thanks!
ascheevel
Community Contributor
Posts: 286
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: PA 2.0.9.1
Excel Version: 365
Location: Minneapolis, USA

Re: }ElementAttributes Rule and TI conflict

Post by ascheevel »

Can you post the contents of the Prolog tab of the TI process that updates your budget element dimension?
User avatar
Steve Rowe
Site Admin
Posts: 2410
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: }ElementAttributes Rule and TI conflict

Post by Steve Rowe »

Sounds like you are doing a delete and rebuild to the objects concerned.
This is usually a pretty bad idea, it is much better to clear (data, alias values, structure) and refresh, this avoids issues in the servers object model like the one you have encountered where a rule is flagged as invalid when the object is deleted.
Technical Director
www.infocat.co.uk
kenship
Regular Participant
Posts: 194
Joined: Thu May 30, 2013 1:41 pm
OLAP Product: Cognos
Version: Planning Analytics 2.0.7
Excel Version: 2010

Re: }ElementAttributes Rule and TI conflict

Post by kenship »

Here's one of the error messages:

6132 [b4] ERROR 2018-02-07 13:15:26.846 TM1.Dimension }ElementAttributes_Operating_Budget_Element Dimension Update Fail. Rule Is Invalid: Error compiling rule, line number 16: Element not found "05. Finance"

"05. Finance" is the name of the alias set. The process involves AttrDelete and AttrInsert that put the attribute into the dimension and I believe it is where the error message comes from.

I suspended the AttrDelete and AttrInsert commands the the process run without error. I wonder should it be permanently withdrawn.

Thanks.

Kenneth
Steve Rowe wrote: Wed Feb 07, 2018 9:46 am Sounds like you are doing a delete and rebuild to the objects concerned.
This is usually a pretty bad idea, it is much better to clear (data, alias values, structure) and refresh, this avoids issues in the servers object model like the one you have encountered where a rule is flagged as invalid when the object is deleted.
Drg
Regular Participant
Posts: 159
Joined: Fri Aug 12, 2016 10:02 am
OLAP Product: tm1
Version: 10.2.0 - 10.3.0
Excel Version: 2010

Re: }ElementAttributes Rule and TI conflict

Post by Drg »

Try to use this before

Code: Select all

CubeRuleDestroy(CubeName);
and

Code: Select all

CubeRuleAppend(CubeName, RuleText, IsCalculationRule);
after update dimension with alias

Or create config cube to stet alias rules on time wheen you update dimensionn
example:

Code: Select all

[aliasNameElement] s:= IF( DB(configcube, 'UseRule' , 'DimensionAlias' ) @='DIM_UPDATE' ,STET , your rule to create alias   );
kenship
Regular Participant
Posts: 194
Joined: Thu May 30, 2013 1:41 pm
OLAP Product: Cognos
Version: Planning Analytics 2.0.7
Excel Version: 2010

Re: }ElementAttributes Rule and TI conflict

Post by kenship »

Thanks. Will try!

Kenneth
Drg wrote: Wed Feb 07, 2018 2:14 pm Try to use this before

Code: Select all

CubeRuleDestroy(CubeName);
and

Code: Select all

CubeRuleAppend(CubeName, RuleText, IsCalculationRule);
after update dimension with alias

Or create config cube to stet alias rules on time wheen you update dimensionn
example:

Code: Select all

[aliasNameElement] s:= IF( DB(configcube, 'UseRule' , 'DimensionAlias' ) @='DIM_UPDATE' ,STET , your rule to create alias   );
Drg
Regular Participant
Posts: 159
Joined: Fri Aug 12, 2016 10:02 am
OLAP Product: tm1
Version: 10.2.0 - 10.3.0
Excel Version: 2010

Re: }ElementAttributes Rule and TI conflict

Post by Drg »

I ask you to take into account that CubeRuleDestroy permanently deletes the file. for correct operation, before you perform this function, you must first copy the }elementattribute*.rux file to a temporary folder.
;)
kenship
Regular Participant
Posts: 194
Joined: Thu May 30, 2013 1:41 pm
OLAP Product: Cognos
Version: Planning Analytics 2.0.7
Excel Version: 2010

Re: }ElementAttributes Rule and TI conflict

Post by kenship »

Noted. I'll back up and test the Rule append function to make sure.
Drg wrote: Wed Feb 07, 2018 2:23 pm I ask you to take into account that CubeRuleDestroy permanently deletes the file. for correct operation, before you perform this function, you must first copy the }elementattribute*.rux file to a temporary folder.
;)
ascheevel
Community Contributor
Posts: 286
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: PA 2.0.9.1
Excel Version: 365
Location: Minneapolis, USA

Re: }ElementAttributes Rule and TI conflict

Post by ascheevel »

kenship wrote: Wed Feb 07, 2018 1:20 pm I suspended the AttrDelete and AttrInsert commands the the process run without error. I wonder should it be permanently withdrawn.
This sounds like your answer right there, don't delete and reinsert the attribute during dimension update and you should be good.
holger_b
Posts: 131
Joined: Tue May 17, 2011 10:04 am
OLAP Product: TM1
Version: Planning Analytics 2.0
Excel Version: 2016
Location: Freiburg, Germany

Re: }ElementAttributes Rule and TI conflict

Post by holger_b »

RuleLoadFromFile(Cube, TextFile) could be even quicker if it is just about reinstating the previously deleted rules
kenship
Regular Participant
Posts: 194
Joined: Thu May 30, 2013 1:41 pm
OLAP Product: Cognos
Version: Planning Analytics 2.0.7
Excel Version: 2010

Re: }ElementAttributes Rule and TI conflict

Post by kenship »

Yes and exactly what I'm thinking.

Thanks to all!
holger_b wrote: Wed Feb 07, 2018 3:04 pm RuleLoadFromFile(Cube, TextFile) could be even quicker if it is just about reinstating the previously deleted rules
Post Reply