Page 1 of 1
CellPutS and N Data Commit Issue
Posted: Fri Mar 23, 2012 12:14 am
by PlanningDev
Can anyone confirm that CellPutN and CellPutS don't actually commit data untill after the entire TI is completed? The idea was to write to a update status cube when a TI is kicked off and completed. This would allow me to know what state all of the TIs that run on a regular basis are each day by simply opening the status cube. Unfortunately what I have found is that when using CellPut and then kicking off the TI, I check the status cube and no data exists. Once I am notified that the TI completed successfully I see the data in the cube.
Is this normal behavior?
Re: CellPutS and N Data Commit Issue
Posted: Fri Mar 23, 2012 4:43 am
by Alan Kirk
PlanningDev wrote:Can anyone confirm that CellPutN and CellPutS don't actually commit data untill after the entire TI is completed? The idea was to write to a update status cube when a TI is kicked off and completed. This would allow me to know what state all of the TIs that run on a regular basis are each day by simply opening the status cube. Unfortunately what I have found is that when using CellPut and then kicking off the TI, I check the status cube and no data exists. Once I am notified that the TI completed successfully I see the data in the cube.
Is this normal behavior?
Can't be. I doubt that I'm alone in using a control cube to allow data to be exchanged between TI processes within a chore or a string of ExecuteProcess calls. If the data wasn't committed until the process ended it wouldn't be available for the other processes to share. In addition to which in long running chores I write the start time into my control cube as well as the end time. The transaction log always shows those entries at the time that they're entered, not at the end of the chore. There must be something else at play. Any chance of posting the code in question?
Re: CellPutS and N Data Commit Issue
Posted: Fri Mar 23, 2012 4:45 am
by Alan Kirk
Alan Kirk wrote:PlanningDev wrote:Can anyone confirm that CellPutN and CellPutS don't actually commit data untill after the entire TI is completed? The idea was to write to a update status cube when a TI is kicked off and completed. This would allow me to know what state all of the TIs that run on a regular basis are each day by simply opening the status cube. Unfortunately what I have found is that when using CellPut and then kicking off the TI, I check the status cube and no data exists. Once I am notified that the TI completed successfully I see the data in the cube.
Is this normal behavior?
Can't be. I doubt that I'm alone in using a control cube to allow data to be exchanged between TI processes within a chore or a string of ExecuteProcess calls. If the data wasn't committed until the process ended it wouldn't be available for the other processes to share. In addition to which in long running chores I write the start time into my control cube as well as the end time. The transaction log always shows those entries at the time that they're entered, not at the end of the chore. There must be something else at play. Any chance of posting the code in question?
Edit: A post-posting thought; none of these entries are made into new elements that you're creating in your Status cube during the course of running the process, are they? Especially ones which are created in the Prolog?
Re: CellPutS and N Data Commit Issue
Posted: Fri Mar 23, 2012 5:30 am
by PlanningDev
Nothing special really. In the prolog of a TI that updates a dimension from odbc inhale a cellputn function that rights to my status cube. That cube has the }dimensions dim and a dim that has status items. I have two architect instances and I'm refreshing the status cube after kicking off the update. Nothing appears till after the dim update processes completes
Re: CellPutS and N Data Commit Issue
Posted: Fri Mar 23, 2012 6:30 am
by Alan Kirk
PlanningDev wrote:Nothing special really. In the prolog of a TI that updates a dimension from odbc inhale a cellputn function that rights to my status cube. That cube has the }dimensions dim and a dim that has status items. I have two architect instances and I'm refreshing the status cube after kicking off the update. Nothing appears till after the dim update processes completes
Yabbut... updates a dimension
how? And
where? What I'm getting at here is that if it updates the dimension by say deleting it and recreating it that could have an effect on the }dimensions dim. If you're doing that in the Prolog then (prior to version 10.1 at least) there's the prospect of the }dimensions dim not being correctly updated until after the Metadata tab has passed since metadata changes are made on a copy of the dimension rather than the dimension itself. (Again, prior to 10.1.) That in turn
could be causing a problem with the data being able to be written to a cube which uses such an affected dimension. It's all speculation without seeing the actual code, though.
Re: CellPutS and N Data Commit Issue
Posted: Fri Mar 23, 2012 8:03 am
by lotsaram
PlanningDev wrote:Can anyone confirm that CellPutN and CellPutS don't actually commit data untill after the entire TI is completed? The idea was to write to a update status cube when a TI is kicked off and completed. This would allow me to know what state all of the TIs that run on a regular basis are each day by simply opening the status cube. Unfortunately what I have found is that when using CellPut and then kicking off the TI, I check the status cube and no data exists. Once I am notified that the TI completed successfully I see the data in the cube.
Is this normal behavior?
Is this normal? Yes. A TI will commit all it's data changes when the process completes. Before that time any changed data is only available
internally to the TI process itself (or other processes that are part of the same chore or ExecuteProcess chain), the data only becomes available "
externally" (that is to other threads) after the commit.
I think Alan misread your question as you are asking about externally retrieving the results of the status cell and his initial response is talking about internally being able to retrieve the status update from within the TI or chore.
David raised this issue recently and it was discussed here
http://www.tm1forum.com/viewtopic.php?f=3&t=7074
Re: CellPutS and N Data Commit Issue
Posted: Fri Mar 23, 2012 4:05 pm
by PlanningDev
lotsaram wrote:PlanningDev wrote:Can anyone confirm that CellPutN and CellPutS don't actually commit data untill after the entire TI is completed? The idea was to write to a update status cube when a TI is kicked off and completed. This would allow me to know what state all of the TIs that run on a regular basis are each day by simply opening the status cube. Unfortunately what I have found is that when using CellPut and then kicking off the TI, I check the status cube and no data exists. Once I am notified that the TI completed successfully I see the data in the cube.
Is this normal behavior?
Is this normal? Yes. A TI will commit all it's data changes when the process completes. Before that time any changed data is only available
internally to the TI process itself (or other processes that are part of the same chore or ExecuteProcess chain), the data only becomes available "
externally" (that is to other threads) after the commit.
I think Alan misread your question as you are asking about externally retrieving the results of the status cell and his initial response is talking about internally being able to retrieve the status update from within the TI or chore.
David raised this issue recently and it was discussed here
http://www.tm1forum.com/viewtopic.php?f=3&t=7074
This is exactly my problem and as suspected, the CellPut is not committed till the end of the TI which means there is no way to read the status untill they all complete. My only other thought it is that you could call a process from the API command line and pass parameters that way. Im assuming that this method would get around the issue as the processes/cellputs would not be encapsulated within each other.