TM1 Migration between different environments

Post Reply
sudarshanthakare
Posts: 2
Joined: Tue Aug 08, 2017 6:38 am
OLAP Product: Cognos TM1
Version: 10.2.2
Excel Version: 2016

TM1 Migration between different environments

Post by sudarshanthakare »

Hi Everyone,

I am trying to migrate all TM1 contents (TI Processes) from Teradata(TD) database to SnowFlake(SF) database. In order to make existing TI processes run on SF database, I am trying to programmatically change the ODBC "Data Source Name" under Data SOurce tab of the TI process. There are many TI processes which are having ODBC of teradata, that is why I cannot modify each one manually. I am trying to achieve this by a python code.

What my Python script is doing? Here is the answer => I have developed a Python script which will change the ODBC Data Source Name from the backend; that is, the ODBC name in the ".PRO" file which is generated after creating a TI process. The script is running as expected. But, the problem here is, when the ODBC Data Source Name is changed from TD database to SF database, this change is not being reflected at the front end of the TM1 application; meaning => the .PRO file of TI process is having ODBC name for SF database but the "Data Source Name" under Data Source tab in the TM1 is still showing ODBC name of TD database.

Is there any other way to make these changes programmatically? I need to carry out this activity as a part of automation, to avoid manual user interference.

Attachments:
1. Attachment named "Current Design" shows ODBC TD database structure.
2. Attachment named "New Design" shows changes after Python script has been executed.
Attachments
TM1 Screen Before and After the Change (NO UPDATE).JPG
TM1 Screen Before and After the Change (NO UPDATE).JPG (63.34 KiB) Viewed 3493 times
New Design - b (.PRO file).JPG
New Design - b (.PRO file).JPG (55.34 KiB) Viewed 3493 times
Current Design - b (.PRO file).JPG
Current Design - b (.PRO file).JPG (55.6 KiB) Viewed 3493 times
Thanks,
Sudarshan Thakare
Wim Gielis
MVP
Posts: 3105
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: TM1 Migration between different environments

Post by Wim Gielis »

Hello,

Why do you need to make it so complicated ?
Isn't this just a Find / Replace in *.PRO files of the data directory,
after which you need to bounce the TM1 model (restart the service) to take the changes in effect.
This last step is what you are missing in my opinion in your python script.
Best regards,

Wim Gielis

IBM Champion 2024
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
Drg
Regular Participant
Posts: 159
Joined: Fri Aug 12, 2016 10:02 am
OLAP Product: tm1
Version: 10.2.0 - 10.3.0
Excel Version: 2010

Re: TM1 Migration between different environments

Post by Drg »

Maybe you sould change odbc conection to another DB???
tomok
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: TM1 Migration between different environments

Post by tomok »

Drg wrote: Thu Aug 10, 2017 8:47 am Maybe you sould change odbc conection to another DB???
No, the simple answer is the OP needs to stop and restart the TM1 service in order for his changes to become active. Remember, TM1 is a memory-based OLAP. Whatever is currently in memory is your live system. If you "hack" the system by manually editing files in the data directory your changes are not going to be "live" and your hack is at risk of being overwritten. For example, if the OP changed a TI process by manually editing the .PRO file and then a few minutes later made a change to the same TI through the TI Editor and saved the TI the hack would be lost. That's because TM1 would be saving the TI to disk based on what was currently in memory, which would be the original TI, plus the changes he made through the UI, not including the hack.

There are a few exceptions to the rule, private subsets being the most common, but for the most part direct hacks to file(s) in the data folder need to be followed by a recycling of the TM1 service to make them active.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
sudarshanthakare
Posts: 2
Joined: Tue Aug 08, 2017 6:38 am
OLAP Product: Cognos TM1
Version: 10.2.2
Excel Version: 2016

Re: TM1 Migration between different environments

Post by sudarshanthakare »

Wim Gielis wrote: Thu Aug 10, 2017 7:12 am Hello,

Why do you need to make it so complicated ?
Isn't this just a Find / Replace in *.PRO files of the data directory,
after which you need to bounce the TM1 model (restart the service) to take the changes in effect.
This last step is what you are missing in my opinion in your python script.
oh, thank you sir! that was a silly mistake which I was doing.
Thanks,
Sudarshan Thakare
Post Reply