Sandbox unloading using TI

Post Reply
Kreddy
Posts: 5
Joined: Fri Sep 23, 2022 5:25 am
OLAP Product: Planning Analytics
Version: 10.2
Excel Version: 2016

Sandbox unloading using TI

Post by Kreddy »

Hello All,

I want to delete the sandbox via TI for which i used ServerSandboxesDelete. The command doesn't delete the in-memory sandboxes. The sandboxes needs to be unloaded before deleting the sandbox. Is there any way or any command which can help in unloading sandboxes.

Thanks for your response.

Regards,
Kousalya
ascheevel
Community Contributor
Posts: 287
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: PA 2.0.9.1
Excel Version: 365
Location: Minneapolis, USA

Re: Sandbox unloading using TI

Post by ascheevel »

Are you trying to delete sandboxes during business hours when users potentially have cube views open and reviewing data in a sandbox you're trying to delete? Could you instead try to delete sandboxes during quiet hours or make it part of a startup chore?
Kreddy
Posts: 5
Joined: Fri Sep 23, 2022 5:25 am
OLAP Product: Planning Analytics
Version: 10.2
Excel Version: 2016

Re: Sandbox unloading using TI

Post by Kreddy »

Hi,

The process is mainly used for simulation to check the impacts of changing some inputs and verify the final numbers without any committing this data to the cube. And there will be multiple such requests and sandbox is created in TI. So as & when the operation is done, the sandbox is no longer needed. And the deletion helps to release the memory.

Thanks,
Kousalya
ascheevel
Community Contributor
Posts: 287
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: PA 2.0.9.1
Excel Version: 365
Location: Minneapolis, USA

Re: Sandbox unloading using TI

Post by ascheevel »

Kreddy wrote: Fri Jan 06, 2023 11:30 am The process is mainly used for simulation to check the impacts of changing some inputs and verify the final numbers without any committing this data to the cube.
...yes, this is a textbook use case for a sandbox.

I've done a bit of testing and the user logging off seems to be a key trigger to unloading the sandbox from memory although it's not consistent or perhaps there needs to be a delay. I played around with calling SaveDataAll after the client logged off and didn't get consistent results. What I did consistently find was that when I tried to call a delete TI on a sandbox I created, it would never work until I first logged off and then back on and when I logged back on, I made sure not to open any cubes. If you're going to ask an enduser to do all of that, it's much easier to simply train them how to delete a sandbox from the cube view viewer.

The one method that worked without fail is one mentioned in my original reply: put a sandbox cleanup process on a chore that you then specify as a startup chore in the config file. If you haven't spent much time yet digging through the filter attributes for the ServerSandboxesDelete function, there's decent filtering capability available. You can for example delete all sandboxes older than a specified date or all sandboxes whose name contains some string.

If the option is available to you, the rest-api sandbox delete action appears to work regardless if the sandbox is in use or not.

edit 2023-04-17: the 1.11 release of TM1py includes additional sandbox functionality for easier cleanup actions referenced in line above
Last edited by ascheevel on Mon Apr 17, 2023 3:19 pm, edited 1 time in total.
Kreddy
Posts: 5
Joined: Fri Sep 23, 2022 5:25 am
OLAP Product: Planning Analytics
Version: 10.2
Excel Version: 2016

Re: Sandbox unloading using TI

Post by Kreddy »

Thanks for the reply.

Yes, i tried experimenting similarly and found it to be inconsistent.

I have been going through the filter options available and though they are very helpful, the immediate deletion is not possible as you mentioned.

I will try out the rest api option.

Regards,
Kousalya
Post Reply