Alias Strangess

Post Reply
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Alias Strangess

Post by jim wood »

Guys,

I am running the following code to set an alias based on possible repartition found within the original hierarchy stored stored as text attribute. (The repartition within dimension source is taken care of in the dimbuild process.)

Code: Select all

[b]Prolog[/b]

vAliasName='Product_Alias_Attribute';

ATTRDELETE('mpl_Product_WCP',vAliasName);

savedataall();

ATTRINSERT('mpl_Product_WCP','',vAliasName,'A');

[b]MetaData[/b]

#****Begin: Generated Statements***
Text_Attribute=ATTRS('mpl_Product_WCP',mpl_Product_WCP,'Product_Text_Attribute');
#****End: Generated Statements****

vAliasBase=Text_Attribute;
vAliasOne=vAliasBase|'-';
vAliasTwo=vAliasBase|'--';
vAliasThree=vAliasBase|'---';
vAliasFour=vAliasBase|'-----';
vElement=mpl_Product_WCP;

IF(DIMIX('mpl_Product_WCP',vAliasBase)=0);
  AttrPutS(vAliasBase,'mpl_Product_WCP',vElement, vAliasName);
  ElseIF(DIMIX('mpl_Product_WCP',vAliasOne)=0);
  AttrPutS(vAliasOne,'mpl_Product_WCP',vElement, vAliasName);
  ElseIF(DIMIX('mpl_Product_WCP',vAliasTwo)=0);
  AttrPutS(vAliasTwo,'mpl_Product_WCP',vElement, vAliasName);
  ElseIF(DIMIX('mpl_Product_WCP',vAliasThree)=0);
  AttrPutS(vAliasThree,'mpl_Product_WCP',vElement, vAliasName);
  ElseIF(DIMIX('mpl_Product_WCP',vAliasFour)=0);
  AttrPutS(vAliasFour,'mpl_Product_WCP',vElement, vAliasName);
EndIF;
It seems that despite the alias being deleted it is retaining it's content within memory so when I check the index it thinks there is an alias in place even though the alias had been deleted. Has anybody else hit this issue?

Jim.

PS. I tried adding a save data all to force a commit.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Alias Strangess

Post by tomok »

I can't speak to your situation because I've never seen anyone try something quite like you are doing here but every time I've had an unexplained alias issue the only solution has been to re-cycle the server to get a clean look.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Alias Strangess

Post by jim wood »

That does work but it's not practical for what we are doing.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Alias Strangess

Post by declanr »

I seem to recall hitting something like this a couple of years ago (due to the timeframe my memory may be lacking in areas)... I never really got to the bottom of why it was happening but seemed to be able to solve it by running the TI in 2 parts e.g.

TI A contains the delete attribute command and a savedataall. Then finishes by executing TI B

TI B obviously contains the add alias etc.


Like I say I never got to the bottom of explaining why this was a problem or why the solution seemed to work (and I think this would have been while I was using 9.5.1 or possibly 9.5.2), it was part of a list of a million or so problems and as such if something worked I didn't exactly have the time to work out why it worked... looking a gift horse in the mouth etc.

Would be interesting to know if this solution works for you? And if it does would anyone care to explain the logic?
Declan Rodger
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Alias Strangess

Post by jim wood »

It didn't work for me. I created a temp process that contains the delete and save data only. I ran this then I re-ran my normal process with out success,

Jim.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Alias Strangess

Post by declanr »

jim wood wrote:It didn't work for me. I created a temp process that contains the delete and save data only. I ran this then I re-ran my normal process with out success,
Like I say it was a while ago so I may have got myself confused on how it was actually solved.

If the only issue is that you want to essentially "clear out" the existing aliases... could you just add an extra step where rather than deleting the entire attribute you just commit the principle name back to being the alias so it would essentially be at the same state it is when the attribute/alias is newly created?
Declan Rodger
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Alias Strangess

Post by jim wood »

Good call Declan. I was going to try some other approaches like writing back blank values to the control cube but that's an excellent idea thanks,

Jim.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Alias Strangess

Post by jim wood »

Declan,

That worked really well. (Instead of creating a new process I just had to use both the meta data and data tabs.) Thank you very much sir. You are both a scholar and a gent,

Jim.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
User avatar
qml
MVP
Posts: 1098
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: Alias Strangess

Post by qml »

I just stumbled across this old thread and thought I'd share my alternative solution.

If I need to purge alias values from memory without bouncing the server so that they can be reused, I find the following approach to work.

1) Create a separate subprocess that has any data source with 1 row only.

2) On the Prolog tab delete the alias (AttrDelete) and add a dummy element to your dimension (DimensionElementInsert).

3) On the Metadata tab remove the dummy element you added in Prolog (DimensionElementDelete).

4) On the Epilog tab recreate the alias you deleted in Prolog (AttrInsert).

After executing such a subprocess the dimension should be recompiled and have no memory of the alias values assigned before, so they can be reused.

I have never encountered problems with this logic, but it might be version dependent etc, so use with caution and test thouroughly before deploying in prod.
Last edited by qml on Mon Dec 10, 2012 3:05 pm, edited 1 time in total.
Kamil Arendt
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Alias Strangess

Post by jim wood »

A nice little work around. I've seen other people on here sharing such pains so this will be really useful, Thanks.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Post Reply