renaming smb name through all model

Post Reply
User avatar
ioscat
Regular Participant
Posts: 209
Joined: Tue Jul 10, 2012 8:26 am
OLAP Product: Contributor
Version: 9.5.2 10.1.1 10.2
Excel Version: 07+10+13
Contact:

renaming smb name through all model

Post by ioscat »

Good day.
We need to rename dimesion elements. We are going to use SwapAliasWithPrincipalName process function. Still old names stored in alias all rules and processes proceed working. But it's maybe not handy use aliases and principals in same rule file or process if smb needs to modify model. Is there any way to come through all model (rules, processes, control object rules) and provide carrying out to common?
Are there any bugs with SwapAliasWithPrincipalName?
Andy Key
MVP
Posts: 352
Joined: Wed May 14, 2008 1:37 pm
OLAP Product: TM1
Version: 2.5 to PA
Excel Version: Lots
Location: Sydney
Contact:

Re: renaming smb name through all model

Post by Andy Key »

ioscat wrote:Good day.
We need to rename dimesion elements. We are going to use SwapAliasWithPrincipalName process function. Still old names stored in alias all rules and processes proceed working. But it's maybe not handy use aliases and principals in same rule file or process if smb needs to modify model. Is there any way to come through all model (rules, processes, control object rules) and provide carrying out to common?
Not built into the product.
ioscat wrote:Are there any bugs with SwapAliasWithPrincipalName?
Given the caveats at the end of this document http://www-01.ibm.com/support/docview.w ... wg21571068 I would say that IBM aren't 100% confident in SwapAliasWithPrincipalName is going to work every time.
Andy Key
User avatar
ioscat
Regular Participant
Posts: 209
Joined: Tue Jul 10, 2012 8:26 am
OLAP Product: Contributor
Version: 9.5.2 10.1.1 10.2
Excel Version: 07+10+13
Contact:

Re: renaming smb name through all model

Post by ioscat »

Andy Key wrote:Andy Key
But is it possible to perform process? What can the code look like? For example...

Code: Select all

#Prolog Tab
for (from first cube to last)
{
 Open rule; 
 if (find FlippedDimmension) 
       than ( change FlippedDimmension.ElementName to Alias)
}
Wim Gielis
MVP
Posts: 3241
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: renaming smb name through all model

Post by Wim Gielis »

You could use tools like Notepad++ to lookup for a certain word in rules files (*.rux) or Turbo Integrator processes (*.pro).
You need to restart the TM1 service (the "model") if you want to see the effect of changes made in files using the filesystem.
For example, manually opening a .rux file, replacing elements and closing again.

Next to that, you should loop over dimensions, not cubes, if you are looking for a use of SwapAliasWithPrincipalName.
That one is not about cubes but about dimensions.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Andy Key
MVP
Posts: 352
Joined: Wed May 14, 2008 1:37 pm
OLAP Product: TM1
Version: 2.5 to PA
Excel Version: Lots
Location: Sydney
Contact:

Re: renaming smb name through all model

Post by Andy Key »

ioscat wrote:But is it possible to perform process?
Yes, it is possible. But whether it would be a good use of anyone's time to even attempt to write this process rather than make the changes manually is a different question.

What if one of your new aliases matches the name of a cube or dimension? Or a reserved word? Or an element in a different dimension? How is your process going to know whether or not it should change the matched string in these events?

There are far too many opportunities for this sort of process to make a complete mess of your system.
Andy Key
Wim Gielis
MVP
Posts: 3241
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: renaming smb name through all model

Post by Wim Gielis »

Andy Key wrote:
ioscat wrote:But is it possible to perform process?
Yes, it is possible. But whether it would be a good use of anyone's time to even attempt to write this process rather than make the changes manually is a different question.

What if one of your new aliases matches the name of a cube or dimension? Or a reserved word? Or an element in a different dimension? How is your process going to know whether or not it should change the matched string in these events?

There are far too many opportunities for this sort of process to make a complete mess of your system.
Or dimension names or cube names that are not hardcoded, but for example, concatenated. (say, a prefix and the main part)
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Post Reply