Changing element name

Post Reply
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

Changing element name

Post by BariAbdul »

This might be quite easy one TM1 gurus,I need to change an element name in the model,I know I need to create an alias and simply use the TI function: SwapAliasWithPrincipalName(DimName,AiasName,Flag) in prolog.
But my question is, this particular element has been refrenced widely in rules with other cubes.Is there any chance of something going amiss if I change the element name.Thanks
"You Never Fail Until You Stop Trying......"
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Changing element name

Post by jim wood »

I'm sur ethis is something that is easily done these in PM, but in earlier version it was a task. From what I know of PM it will simply run TI's in the background. For rules it will depend I guess on how they are defined, if they are link / dimension calculations setup in PM you're probably good. Any manual calculations added will probably be another question entriely,

Jim.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
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: Changing element name

Post by BariAbdul »

Thanks for the reply Jim,unfortunately I am on 9.5.2 so PM is out of question , as I mentioned before there are quite a few rules written across the cubes on this element,is there any workaround to this,Please! Thanks
"You Never Fail Until You Stop Trying......"
tomok
MVP
Posts: 2836
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: Changing element name

Post by tomok »

Your only option is to use a text editing tool against the .rux files for a search and replace. I'm partial to Notepad ++ but there are other tools that function just as well. 1) Go to the data folder and open all the .rux files, 2) search and replace, delete all the .blb files where all the characters on the left hand side of the dot (".") equal the cube name (these files are rules formatting files), 3) recycle the server.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
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: Changing element name

Post by BariAbdul »

Thanks a lot Tomok,Appreciate your help.
"You Never Fail Until You Stop Trying......"
User avatar
gtonkin
MVP
Posts: 1269
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: Changing element name

Post by gtonkin »

You could also try using SED (command line tool)

You need to use notepad to create an input file for SED to process - call it rename.sed for example then enter in

Code: Select all

s/\OLDNAME/NEWNAME/g
I then use a batch file to execute through the various file types:

Code: Select all

@echo off
set currdir=%CD%
echo %currdir%

for /R  %%D  in (.) do (
echo %%D
  cd %%D
  for /F "tokens=*" %%F in ('dir *.rux /b') do ( echo %%F
	sed -f %currdir%\rename.sed "%%F" >temp
	move /Y temp "%%F" >nul
    )
  cd ..
)
I would recommend a solid back-up and double-and triple checking once run.
You may need to add multiple lines in rename.sed for mutiple search and replaces. Also keep in mind that the example is case sensitive - there may be parameters you can pass to search and replace without considering case.
You could/should also copy the FOR section multiple time, one for BLB, RUX and PROs

Read carefully and use at your own risk once you have understood the process - if incorrectly used, you could end up with a whole lot of zero sized files
Attachments
Rename.zip
Sample files
(39.76 KiB) Downloaded 334 times
BR, George.

Learn something new: MDX Views
deepakjain2020
Regular Participant
Posts: 152
Joined: Sat May 25, 2013 10:32 am
OLAP Product: TM1
Version: 9.5.2; 10.2.2
Excel Version: 2007

Re: Changing element name

Post by deepakjain2020 »

Tomok reply is nice :)
You can try with Advance Rules Editor for search and replace. Which will not require deletion of .blb files.

Regards,
Deepak Jain
tomok
MVP
Posts: 2836
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: Changing element name

Post by tomok »

deepakjain2020 wrote:You can try with Advance Rules Editor for search and replace. Which will not require deletion of .blb files.
Indeed you can but you have to do each rule file one by one. With Notepad ++ you can open all the files at once and do just one search and replace. Much more efficient.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
deepakjain2020
Regular Participant
Posts: 152
Joined: Sat May 25, 2013 10:32 am
OLAP Product: TM1
Version: 9.5.2; 10.2.2
Excel Version: 2007

Re: Changing element name

Post by deepakjain2020 »

Thanks Tomok. That's good one :)
Post Reply