}ElementAttributes Rule and TI conflict

Post Reply
kenship
Posts: 111
Joined: Thu May 30, 2013 1:41 pm
OLAP Product: Cognos
Version: TM1 10.2
Excel Version: 2010

}ElementAttributes Rule and TI conflict

Post by kenship » Tue Feb 06, 2018 9:33 pm

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
Posts: 40
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: 11.2
Excel Version: 2016

Re: }ElementAttributes Rule and TI conflict

Post by ascheevel » Wed Feb 07, 2018 6:44 am

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: 1800
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: 10.2.2., PAW
Excel Version: Nearly all of them

Re: }ElementAttributes Rule and TI conflict

Post by Steve Rowe » 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.

kenship
Posts: 111
Joined: Thu May 30, 2013 1:41 pm
OLAP Product: Cognos
Version: TM1 10.2
Excel Version: 2010

Re: }ElementAttributes Rule and TI conflict

Post by kenship » Wed Feb 07, 2018 1:20 pm

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
Posts: 84
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 » 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   );

kenship
Posts: 111
Joined: Thu May 30, 2013 1:41 pm
OLAP Product: Cognos
Version: TM1 10.2
Excel Version: 2010

Re: }ElementAttributes Rule and TI conflict

Post by kenship » Wed Feb 07, 2018 2:20 pm

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
Posts: 84
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 » 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.
;)

kenship
Posts: 111
Joined: Thu May 30, 2013 1:41 pm
OLAP Product: Cognos
Version: TM1 10.2
Excel Version: 2010

Re: }ElementAttributes Rule and TI conflict

Post by kenship » Wed Feb 07, 2018 2:25 pm

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
Posts: 40
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: 11.2
Excel Version: 2016

Re: }ElementAttributes Rule and TI conflict

Post by ascheevel » Wed Feb 07, 2018 2:37 pm

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: 115
Joined: Tue May 17, 2011 10:04 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2016
Location: Freiburg, Germany

Re: }ElementAttributes Rule and TI conflict

Post by holger_b » Wed Feb 07, 2018 3:04 pm

RuleLoadFromFile(Cube, TextFile) could be even quicker if it is just about reinstating the previously deleted rules

kenship
Posts: 111
Joined: Thu May 30, 2013 1:41 pm
OLAP Product: Cognos
Version: TM1 10.2
Excel Version: 2010

Re: }ElementAttributes Rule and TI conflict

Post by kenship » Wed Feb 07, 2018 3:06 pm

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