Dear community,
we are expanding our application/server by the use of TM1py. Guess, that for those of you, who work with it for years already, our current issue is familiar and you can help us:
We have two processes:
- Processes1 imports data via tm1py to a cube
- Process2 transforms the data
Both work fine, when I run them one after another. The problem arises, when I wrap the process executions into one process: Process2 does not see the imported data.
It doesn't matter, if I do the ExecuteProcess-commands both in Prolog or Epilog, or the first in Prolog and the second in Epilog.
Process2 sees the data, when I add a CubeSaveData between the execution of Process1 and Process2. So, it looks to me, that the imported data is not committed before the end of the wrap-up-process.
How can I update the data without CubeSaveData, so that TM1 sees it right after finishing the python script? Does TM1py provide a solution for that?
Thanks in advance!
Commit after TM1py-data-import
-
- Regular Participant
- Posts: 226
- Joined: Wed May 06, 2020 2:58 pm
- OLAP Product: Planning Analytics
- Version: 2.0.9
- Excel Version: 2016
Re: Commit after TM1py-data-import
What you've explained is typical behaviour, during process 1, you'll be spawning a separate thread to import the data and the active thread which is running process 1 & 2 can't see the data as at the time the active thread started that data didn't exist. One option is you serialize the data like you have done using CubeSaveData.
I'm assuming tm1py is writing back directly to the cube via process one.
As an alternative, instead of executing process 2 directly from tm1, you could execute process 2 within your tm1py script after importing the data, thereby ensuring they both run in the same thread.
I'm assuming tm1py is writing back directly to the cube via process one.
As an alternative, instead of executing process 2 directly from tm1, you could execute process 2 within your tm1py script after importing the data, thereby ensuring they both run in the same thread.
-
- Posts: 18
- Joined: Mon Sep 07, 2020 12:54 pm
- OLAP Product: Planning Analytics
- Version: 2.0.8
- Excel Version: MS 365
Re: Commit after TM1py-data-import
Thanks burnstripe for your reply!
I hoped, I can leave the code modularly, in order to run Process1 and Process2 also separately.
The amount of imported data might grow, so I hoped to avoid CubeSaveData, since it might take its time and downgrade my performance. Guess, I will play around a bit, to find out what's fitting best to our constellation.
But, though, thanks again for making up your mind for my issue!
I hoped, I can leave the code modularly, in order to run Process1 and Process2 also separately.
The amount of imported data might grow, so I hoped to avoid CubeSaveData, since it might take its time and downgrade my performance. Guess, I will play around a bit, to find out what's fitting best to our constellation.
But, though, thanks again for making up your mind for my issue!
-
- Regular Participant
- Posts: 226
- Joined: Wed May 06, 2020 2:58 pm
- OLAP Product: Planning Analytics
- Version: 2.0.9
- Excel Version: 2016
Re: Commit after TM1py-data-import
You still could have it modular. But instead have a master process to choose which process to run and embed a parameter in the python script such that it knows which section to run.