SwapAliasWithPrincipalName

Post Reply
User avatar
PavoGa
MVP
Posts: 616
Joined: Thu Apr 18, 2013 6:59 pm
OLAP Product: TM1
Version: 10.2.2 FP7, PA2.0.9.1
Excel Version: 2013 PAW
Location: Charleston, Tennessee

SwapAliasWithPrincipalName

Post by PavoGa »

Have run into a brick wall with this:

I have a dimension that has two elements that I want to swap the data between. Thought maybe using SwapAliasWithPrincipalName would do the trick and it does...until the server is restarted and the dimension elements appear to return to their original, un-swapped state. Before swap:

ElemX $1000
ElemY $1100

After using SwapAliasWithPrincipalName twice (change each to some intermediary name and then to their final designation) I have:

ElemY $1000
ElemX $1100

When the server restarts, it goes back to the original, pre-swap display. Have tried a number of things, including doing the swap, creating a copy of the dimension with a TI, using the copy to update the original dimension, or trying to substitute the dimension copy when server is down then restarting the server. In both these cases I wind up with:

ElemX $1000 and ElemY has lost its data.

Has anyone had to do anything like this and done it successfully? It appears this cannot be done without using a TI or TI's to move the data around.
Ty
Cleveland, TN
BariAbdul
Regular Participant
Posts: 424
Joined: Sat Mar 10, 2012 1:03 pm
OLAP Product: IBM TM1, Planning Analytics, P
Version: PAW 2.0.8
Excel Version: 2019

Re: SwapAliasWithPrincipalName

Post by BariAbdul »

SwapAliasWithPrincipalName is known to have some issues and wouldn't be trusted fully. Couldn't you export the data and do the necessary changes and import it back.Of course data backup is mandatory.It far more reliable and easier.Thanks.
"You Never Fail Until You Stop Trying......"
User avatar
gtonkin
MVP
Posts: 1192
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: SwapAliasWithPrincipalName

Post by gtonkin »

One trick to remember is to always dirty the cube(s) you impact i.e. if you swap a measure, make sure you change a value in each cube that dimension is used in, then save data.
User avatar
PavoGa
MVP
Posts: 616
Joined: Thu Apr 18, 2013 6:59 pm
OLAP Product: TM1
Version: 10.2.2 FP7, PA2.0.9.1
Excel Version: 2013 PAW
Location: Charleston, Tennessee

Re: SwapAliasWithPrincipalName

Post by PavoGa »

SwapAliasWithPrincipalName is known to have some issues and wouldn't be trusted fully. Couldn't you export the data and do the necessary changes and import it back.Of course data backup is mandatory.It far more reliable and easier.Thanks.
Yes, but this dimension affects a lot of cubes, so that is the last resort.
One trick to remember is to always dirty the cube(s) you impact i.e. if you swap a measure, make sure you change a value in each cube that dimension is used in, then save data.
Interesting! I will try that this morning and report the result.
Ty
Cleveland, TN
tomok
MVP
Posts: 2831
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: SwapAliasWithPrincipalName

Post by tomok »

PavoGa wrote:
One trick to remember is to always dirty the cube(s) you impact i.e. if you swap a measure, make sure you change a value in each cube that dimension is used in, then save data.
Interesting! I will try that this morning and report the result.
It's not really a trick but rather a requirement. In order to trigger a cube save you have to change an actual value in the cube. Just changing a dimension in the cube, even if it may mean some elements go away, or new ones added, will not trigger a save. You will still be left with the same .cub file.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
bmrizzuti
Posts: 9
Joined: Fri May 11, 2012 1:38 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Re: SwapAliasWithPrincipalName

Post by bmrizzuti »

What I would do is use a third "Dummy" Attribute to do the swapping.

So we have attribute A, attribute B, and our Dummy attribute C.

So the Operation would be

A-->C
B-->A
C-->B

Blank or zero "C".

EDIT: In case you just want to swap data is the same operation.
User avatar
PavoGa
MVP
Posts: 616
Joined: Thu Apr 18, 2013 6:59 pm
OLAP Product: TM1
Version: 10.2.2 FP7, PA2.0.9.1
Excel Version: 2013 PAW
Location: Charleston, Tennessee

Re: SwapAliasWithPrincipalName

Post by PavoGa »

One trick to remember is to always dirty the cube(s) you impact i.e. if you swap a measure, make sure you change a value in each cube that dimension is used in, then save data.
Performed the following steps:

1) Swapped the ElemX and ElemY with ElemXa and ElemYa aliases.
2) Dirtied the cube, changing some data in both ElemXa and ElemYa.
3) Cycled the server. So far so good, ElemXa and ElemYa had the expected data.
4) Changed the aliases for ElemXa and ElemYa to ElemY and ElemX respectively.
5) Swapped the aliases and ElemY and ElemX now hold the data originally in ElemX and ElemY respectively.
6) Dirtied the cube again for both elements.
7) Cycled the server.
8) Opened the cube and the data was back in its original ElemX and ElemY cells. :?
Ty
Cleveland, TN
Post Reply