TI commits
-
- Posts: 43
- Joined: Fri Aug 01, 2014 5:17 pm
- OLAP Product: Cognos
- Version: 10.1.1
- Excel Version: 2010
TI commits
Good Morning Sir, i am confused when does TI commits in each like tab prolog,metadata ,data,epilog tabs and how is each commit is different.please explain
- qml
- MVP
- Posts: 1096
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: TI commits
Generally speaking (although there are some 'instant commit' exceptions) metadata changes made in a process are committed after the Metadata procedure/tab and before the Data procedure/tab. That is why (again, with some specific exceptions) metadata manipulation functions cannot be used on the Data or Epilog tabs, but can be freely used in Prolog or Metadata.
Data changes are more straightforward. All data changes from Prolog, Metadata, Data and Epilog are collected during execution and committed as a single transaction at the very end (after Epilog).
It is also possible to force a data commit during any tab by executing a SaveDataAll which includes its own transaction commit. I would personally call it a hack and certainly would not reccommend using it for this purpose unless you know exactly what you are doing and why.
Data changes are more straightforward. All data changes from Prolog, Metadata, Data and Epilog are collected during execution and committed as a single transaction at the very end (after Epilog).
It is also possible to force a data commit during any tab by executing a SaveDataAll which includes its own transaction commit. I would personally call it a hack and certainly would not reccommend using it for this purpose unless you know exactly what you are doing and why.
Kamil Arendt
-
- MVP
- Posts: 264
- Joined: Mon Nov 03, 2014 8:23 pm
- OLAP Product: TM1
- Version: 9.5.2 10.1 10.2 PA2
- Excel Version: 2016
Re: TI commits
This is not 100% correct. Metadata changes are made available to the rest of the TI process after the metadata procedure/tab but they are not "committed" and made public to the rest of the users. Only the final commit at the end of the transaction actually publishes all changes.qml wrote:Generally speaking (although there are some 'instant commit' exceptions) metadata changes made in a process are committed after the Metadata procedure/tab and before the Data procedure/tab.
While SaveDataAll does perform a commit and publish all edits previously made, I very strongly recommend against using in the middle of any process or chore. I thought there was some IBM documentation recommending SaveDataAll only be used as the last line of the Epilog tab, but I can't seem to find it right now. One major reason not to do any work after a SaveDataAll is the potential for double commits. Essentially, if the process does some work then calls SaveDataAll and then tries to do some more work but hits lock contention and rolls back, all the work done before the SaveDataAll will be done (and committed) twice. Depending on the specific workload this may just be an annoyance, but if you're using something like CellIncrementN, you would see the cell(s) incremented more than once.
- Elessar
- Community Contributor
- Posts: 412
- Joined: Mon Nov 21, 2011 12:33 pm
- OLAP Product: PA 2
- Version: 2.0.9
- Excel Version: 2016
- Contact:
Re: TI commits
Just a little addition: If you still wanna (despite of Brian's and qml's warnings) use SaveDataAll somewhere outside the end of epilog, it's better to use CubeSaveData.
-
- Posts: 43
- Joined: Fri Aug 01, 2014 5:17 pm
- OLAP Product: Cognos
- Version: 10.1.1
- Excel Version: 2010
Re: TI commits
Thank you All,I have one more doubt what will happen when I run the data code that is cellgetN and cellPutN in metadata ,it is adding the data successfully but does this code run in data tab also since it should be there or it just runs in metadata tab and goes to epilog.please explain.
- qml
- MVP
- Posts: 1096
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: TI commits
Data changes are fine to do on any tab, as I already said. Obviously, if they rely on metadata changes that are only effected at the end of the Metadata tab then you have no choice but to have them on the Data tab.
If you can avoid having code on both the Metadata tab and the Data tab then the process will run faster as it won't have to loop through the data source twice. It's not always possible to do, but if you only have data changes (e.g. CellPutS) to do then put them all on one tab (either Metadata or Data) and keep the other tab empty.
If you can avoid having code on both the Metadata tab and the Data tab then the process will run faster as it won't have to loop through the data source twice. It's not always possible to do, but if you only have data changes (e.g. CellPutS) to do then put them all on one tab (either Metadata or Data) and keep the other tab empty.
Kamil Arendt
-
- MVP
- Posts: 264
- Joined: Mon Nov 03, 2014 8:23 pm
- OLAP Product: TM1
- Version: 9.5.2 10.1 10.2 PA2
- Excel Version: 2016
Re: TI commits
SaveDataAll will commit and publish all edits previously made as well as saving data to disk and truncating the transaction log. All previous edits now persist and are visible to everyone else. CubeSaveData does not do this. CubeSaveData writes out all data from memory to disk for a single cube. Other objects are not affected and this doesn't change the visibility of any edits to other users or truncate the transaction log.Elessar wrote:Just a little addition: If you still wanna (despite of Brian's and qml's warnings) use SaveDataAll somewhere outside the end of epilog, it's better to use CubeSaveData.
-
- Posts: 43
- Joined: Fri Aug 01, 2014 5:17 pm
- OLAP Product: Cognos
- Version: 10.1.1
- Excel Version: 2010
Re: TI commits
Thanks you QML and all.I understand now.