Run Chore in several sandboxes

Post Reply
Boas
Posts: 12
Joined: Mon Sep 07, 2020 12:54 pm
OLAP Product: Planning Analytics
Version: 2.0.8
Excel Version: MS 365

Run Chore in several sandboxes

Post 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?
Wim Gielis
MVP
Posts: 3105
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Run Chore in several sandboxes

Post by Wim Gielis »

Hello,

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

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
burnstripe
Regular Participant
Posts: 197
Joined: Wed May 06, 2020 2:58 pm
OLAP Product: Planning Analytics
Version: 2.0.9
Excel Version: 2016

Re: Run Chore in several sandboxes

Post 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
Boas
Posts: 12
Joined: Mon Sep 07, 2020 12:54 pm
OLAP Product: Planning Analytics
Version: 2.0.8
Excel Version: MS 365

Re: Run Chore in several sandboxes

Post 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!
Post Reply