tm1py-samples icon indicating copy to clipboard operation
tm1py-samples copied to clipboard

TI process hot promotion

Open wimgielis opened this issue 5 years ago • 4 comments

Hi Marius,

Do we have a sample code to hot promote a TI process, that is: we provide the full path to a *.pro file and promote it as a TI process to the TM1 server ? Assuming no syntax errors in the PRO file. This would be useful since it would allow us to not bring down the TM1 server. I see different process samples but I am not sure we have a sample for this requirement.

Thanks !

Wim

wimgielis avatar Oct 01 '20 15:10 wimgielis

Hi @wimgielis,

TM1py doesn't provide a function to build a TM1py.Process from a .pro file. If you have the process available as a JSON file somewhere, you can use the Process.from_json() function. You can read more about it here: https://github.com/cubewise-code/tm1py/issues/351

You may want to look into Pulse for TM1. Pulse can deploy .pro files to TM1 live.

MariusWirtz avatar Oct 02 '20 07:10 MariusWirtz

I'm looking to create solutions that use TI and/or tm1py. I am not reaching out to other tools like Pulse for example. The idea is that I need to quickly deploy these processes at our customers, without bouncing the server. I will investigate my options. If anyone already scripted this in Python, please leave a message. Thanks for your feedback.

wimgielis avatar Oct 02 '20 09:10 wimgielis

So far nobody dared to write a function that turns a .pro file into a TM1py Process object (which can then be sent to TM1).

If you are keen, you could add a from_pro function to the Process class in TM1py. If you don't feel comfortable you could just open an issue/feature-request in the TM1py project and request this feature. Perhaps you are not the only one that would appreciate that feature. https://github.com/cubewise-code/tm1py/issues

MariusWirtz avatar Oct 02 '20 09:10 MariusWirtz

Thanks. Well, my background is Excel and VBA, then I added Turbo Integrator and SQL, AutoHotKey. Only recently a bit of Python. I am now starting to use tm1py which wasn't that easy, so adding advanced Python code will not be for now. What I did, however, was creating TI processes with the old TM1 API from VBA. The reason is that I have an Excel interface to generate data-integration processes (say, copy from 1 cube to another and making selections/zeroout's, ...) and VBA and the old API translate the input into a process with hot promotion.

wimgielis avatar Oct 02 '20 10:10 wimgielis