Page 1 of 1

TM1 Migration between different environments

Posted: Thu Aug 10, 2017 7:07 am
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.

Re: TM1 Migration between different environments

Posted: Thu Aug 10, 2017 7:12 am
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.

Re: TM1 Migration between different environments

Posted: Thu Aug 10, 2017 8:47 am
by Drg
Maybe you sould change odbc conection to another DB???

Re: TM1 Migration between different environments

Posted: Thu Aug 10, 2017 1:29 pm
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.

Re: TM1 Migration between different environments

Posted: Wed Aug 16, 2017 4:35 am
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.