Page 1 of 1

renaming smb name through all model

Posted: Tue Jul 10, 2012 8:38 am
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?

Re: renaming smb name through all model

Posted: Tue Jul 10, 2012 8:56 am
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.

Re: renaming smb name through all model

Posted: Tue Jul 10, 2012 9:55 am
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)
}

Re: renaming smb name through all model

Posted: Tue Jul 10, 2012 12:24 pm
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.

Re: renaming smb name through all model

Posted: Wed Jul 11, 2012 2:30 am
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.

Re: renaming smb name through all model

Posted: Wed Jul 11, 2012 6:56 am
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)