SwapAliaswithPrincipalName old name in sub and vue files

Post Reply
User avatar
vovanenok
Posts: 67
Joined: Mon Jun 23, 2014 4:54 pm
OLAP Product: TM1
Version: 2.0.3
Excel Version: 2010
Location: Toronto, Canada
Contact:

SwapAliaswithPrincipalName old name in sub and vue files

Post by vovanenok » Tue Apr 09, 2019 8:03 pm

Hi all

I'm playing with SwapAliaswithPrincipalName, in particular I want to test how the new name works in subsets and views
My scenario:
1. Created 1 public subset, 1 private subset, 1 public view, 1 private view
2. Set a TempAlias for my test element
3. Ran a process calling SwapAliaswithPrincipalName and deleting TempAlias after
4. Restarted TM1 server
5. Checked the element was renamed correctly
6. Checked the element showed up in the subsets and views I created previously.
7. Checked sub files: the old name is still there
8. Checked vue files: the old name is still there
9. Checked all the aliases (to make sure the old name was not left anywhere)
10. Tried to Copy-Paste the old name in dimension subset editor, result > element not found.

Even though the new name works fine in subsets and views (I'm still going to do a few tests with data), I'm concerned about the old name in sub and vue files.

Does anybody have experience using SwapAliaswithPrincipalName in PROD?
What do you think about sub and vue files? How come they contain the old element name and it works when opening in Architect?

tomok
MVP
Posts: 2538
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 old name in sub and vue files

Post by tomok » Wed Apr 10, 2019 10:50 am

I'm pretty sure that the function SwapAliaswithPrincipalName is not smart enough to cycle through all your views and subsets and change them. All it does it update the dimension. You're on your own to figure out the best way to update the .sub and .vue files.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/

User avatar
vovanenok
Posts: 67
Joined: Mon Jun 23, 2014 4:54 pm
OLAP Product: TM1
Version: 2.0.3
Excel Version: 2010
Location: Toronto, Canada
Contact:

Re: SwapAliaswithPrincipalName old name in sub and vue files

Post by vovanenok » Wed Apr 10, 2019 11:55 am

Thanks Tom. That was the first thing I thought of. The mystery is those subsets and views perfectly display the new element name after the server restart so somehow TM1 translates the old to new name when loading those sub and vue files on startup

User avatar
vovanenok
Posts: 67
Joined: Mon Jun 23, 2014 4:54 pm
OLAP Product: TM1
Version: 2.0.3
Excel Version: 2010
Location: Toronto, Canada
Contact:

Re: SwapAliaswithPrincipalName old name in sub and vue files

Post by vovanenok » Wed Apr 10, 2019 1:49 pm

One more observation. I opened }ElementAttributes_MyTestDim.cub file in Notepad++ (yes I know .cub are binary files and are not supposed be viewed in a text editor), but among all the not recognized content I can see my TestElementOldName.
The same is for MyTestDim.dim file, I can see both TestElementNewName and TestElementOldName inside that dim binary file.

This explains why TM1 can correctly load sub and vue files so they contain the new element name.
But it bring more concerns about using SwapAliaswithPrincipalName.

One more test:
1. Right-click MyTestDim in Architect > Edit Dimension Structure
2. Insert a new element with name = TestElementOldName
3. Save dimension changes
4. Check my subsets and views, they still correctly show the new element name
5. Open MyTestDim.dim file in Notepad++ and now it shows TestElementOldName twice

Looks like SwapAliaswithPrincipalName messed up the .dim file

Post Reply