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?
SwapAliaswithPrincipalName old name in sub and vue files
-
- 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 old name in sub and vue files
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.
- vovanenok
- Posts: 88
- Joined: Mon Jun 23, 2014 4:54 pm
- OLAP Product: TM1
- Version: 2.0.9
- Excel Version: Office 365
- Location: Toronto, Canada
- Contact:
Re: SwapAliaswithPrincipalName old name in sub and vue files
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
- vovanenok
- Posts: 88
- Joined: Mon Jun 23, 2014 4:54 pm
- OLAP Product: TM1
- Version: 2.0.9
- Excel Version: Office 365
- Location: Toronto, Canada
- Contact:
Re: SwapAliaswithPrincipalName old name in sub and vue files
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
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