How can i do commit in TI process?
Suppose i have some uncommitted data before execution and some data will be updated in the TI process. I need to commit all unsaved data of the current user just in TI epilog
This topic has been locked.
8 replies Latest Post - 2012-09-27T10:07:35Z by vipirailo
Pinned topic Commit in TI process
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-09-27T10:07:35Z at 2012-09-27T10:07:35Z by vipirailo
Re: Commit in TI process2012-09-24T12:23:49Z in response to vipirailoIn addition, it looks like i have no problem with commit changes made in TI. TI process commit all changes were done itself by the default. But do not for those were done before running TI. Even if uncommitted cell will be updated inside of TI it stays uncommitted and unchanged.
To be clear i have to do commit inside TI in prolog. If i could it would be great
Pls, help. Maybe there is some config settings for TM1 to do not use sandbox and write any changes directly to DB.
PS: I've forgotten to say i use Contributor with websheets
SystemAdmin 110000D4XK658 PostsACCEPTED ANSWER
Re: Commit in TI process2012-09-24T23:55:46Z in response to vipirailoHi vipirailo,
I'm not sure I completely understand your question so apologies if I have missed the mark with this response.
In terms of committing changes you can use the SaveDataAll command in the Epilog tab. This command writes data from tm1s.log to the relevant files in the data directory as well as creating a time stamped log file. Alternatively, if this causes performance issues, you could try the CubeSaveData command.
In terms of defining the relevant user sandbox, you can use the SetUseActiveSandboxProperty command to point the user to write to the base data instead of a sandbox.
Finally, to disable the sandbox capabilities on the server you can use the line DisableSandboxing=F in your tm1s.cfg file.
As always, please test in a non production environment before implementing in a production environment.
Hope this helps.
Re: Commit in TI process2012-09-25T06:00:11Z in response to SystemAdminHi, Rod and thank you
Setting DisableSandboxing=T helps me with some issue i want to discuss below.
Also SaveDataAll doesn't help cause data stays uncommitted (blue) for current user but i need to make it committed and not blue (as i update this cell in TI)
Two words about issue i've met after setting DisableSandboxing=T.
Then i open websheet committed before disabling sandbox all is ok. If some data remains uncommitted in users private sandbox when just after disabling the websheet consist such data opens this TM1dotnet error - saying couldn't create Default sandbox.
So my question is how can i clear all private sandbox for all users or transfer their data to base data (it doesn't matter for me cause it's the dev env)
SystemAdmin 110000D4XK658 PostsACCEPTED ANSWER
Re: Commit in TI process2012-09-25T06:45:53Z in response to vipirailoHi vipirailo,
I have never actually needed to do what you are trying...
If you just want to remove the sandboxes then use the ServerSandboxesDelete command in TurboIntegrator.
I am not aware of any command to commit the data via TurboIntegrator however hopefully someone else may be aware of such a command.
One clunky option might be to:
- temporarily remove the DisableSandboxing line from the tm1s.cfg file (this will turn sandboxing back on)
- get the user to run a TI process that extracts view data from the active sandbox to a flat file (this will get more complex if multiple cubes are involved)
- delete the sandboxes
- set the active sandbox to the base data
- import the data from the flat file
Hope this helps but hopefully someone will have a more elegant solution.
Re: Commit in TI process2012-09-25T14:22:03Z in response to SystemAdminHi, Rod.
It looks like disabling sandboxes is not an option at least in Contributor. After turning it on I can't enter data because websheet is grey. If i try take ownership i get the error - can't create Default sandbox. I understand that TM1 really can't as i set that restriction. I think it's a bug of Contributor maybe they don't test how it works without sandbox. Although i get the error, Ownership flag marks current elist member, but after this websheet can't even opened. Hence i have a choice of two option - can't enter data or can't see it
My new question is about deleting sandbox in TI.
I try this:
ServerSandboxesDelete( 'client:=:Admin' );
to check how it works. But no changes were made with admin sandbox (i connected as admin while run TI) Blue data still persists.
What's wrong with sandbox deleting? How can i delete ALL sandboxes to be sure it's possible?
Re: Commit in TI process2012-09-27T10:07:35Z in response to vipirailoHi, all again.
Although i still can't do the commit in TI my current problem was resolved.
I use SetUseActiveSandboxProperty(1); command to reset(set to null) blue (changed) cell for the current user and SetUseActiveSandboxProperty(0); to write other data for all users to see.
PS:my faith is IBM will develop native TI command for commit and rollback in TI someday.
Rizwan.Kaif 27000219XW197 PostsACCEPTED ANSWER
Re: Commit in TI process2012-09-25T00:22:55Z in response to vipirailoAs a 'Best Practice' it is not advised to use the SaveDataAll in every other TI you have got in your model because in many cases it causes severe contentions and performance issues. You can write an individual TI which has the SaveDataAll command only in it. Then you can have a Chore to execute this SaveData TI run after the data load batch.
By batch I mean that if you are updating 5 cubes then you first update all those five cubes first and then at the last you execute the SaveData TI. It is not advised to run SaveData 5 times (after individual cube update) in this case.
Hope that helps!