Page 1 of 1

Run Chore in several sandboxes

Posted: Mon Aug 01, 2022 8:58 am
by Boas
Hi everyone,

in my project a process chain is scheduled to run each night. I was now asking myself, whether it is possible to let this chore run not for the Base only, but also for every users sandbox.

Does anybody have an idea or even a solution for this issue?

Re: Run Chore in several sandboxes

Posted: Mon Aug 01, 2022 5:10 pm
by Wim Gielis
Hello,

Did you check Bedrock TM1 coding ?
There you will have examples on how to apply a certain sandbox.

Re: Run Chore in several sandboxes

Posted: Mon Aug 01, 2022 10:19 pm
by burnstripe
Sandboxes are private objects, to access each users private sandbox you could use the impersonation feature available in rest api.

https://code.cubewise.com/blog/save-tim ... ersonation

This link shows the feature in use with tm1py.
With this you could loop through each user, impersonating them and then running the process(es)

However... One question, have you checked that your changes to the base haven't already transposed itself across to the end users private sandboxes.

My understanding is the data used in sandboxes isn't a copy but an overlay. I.e. The sandbox stores changes from that deviate from the base but nothing else. So for any cells the user hasn't changed in their sandbox, when the base is updated so does their view of the sandbox

Re: Run Chore in several sandboxes

Posted: Wed Aug 03, 2022 8:37 am
by Boas
HI Wim,

thanks for your reply!
Wim Gielis wrote: Mon Aug 01, 2022 5:10 pm Hello,

Did you check Bedrock TM1 coding ?
There you will have examples on how to apply a certain sandbox.
The problem is the point, that sandboxes are private. With "normal" code and commands I can only apply my own sandboxes. But burnstripes idea might be a solution.
burnstripe wrote: Mon Aug 01, 2022 10:19 pm Sandboxes are private objects, to access each users private sandbox you could use the impersonation feature available in rest api.

https://code.cubewise.com/blog/save-tim ... ersonation

This link shows the feature in use with tm1py.
With this you could loop through each user, impersonating them and then running the process(es)
It is correct, burnstripe, that a sandbox is an overlay. And this is completely fine for me. But some of "my" users can adjust scenario parameters in their own sandboxes in order to calculate scenarios that are not centrally maintained. But to see all effects they have to run some TI's in their active sandbox - which can take some time - and is neccessary after nightly changes of the ACT. I was wondering, if I could reduce their manual workload by calculate their scenarios also each night.

Thanks again for your replies!