Most organizations schedule Strategy cube refresh using event-based or time-based schedules configured in Strategy. Cube refresh events are intended to closely follow data warehouse updates or business events.
When updates to the data warehouse happen frequently, such as hourly, the usual approach to keep Strategy cubes current are time-based schedules configured to refresh cubes a short time after the data warehouse updates are complete. Disruptions to data warehouse updates may occur due to competing workloads, job failures, connectivity failures, unexpected volumes, storage issues, etc.
When disruptions to the data warehouse updates occur, Strategy cube refresh may be impacted as follows:
Strategy Cube Trigger (MSCT) allows the process which updates the data warehouse, i.e. the workflow manager or enterprise scheduling tool, to trigger the Strategy cube refresh as soon as data in the warehouse is ready.

Strategy Cube Trigger features include:
MCST is a very lightweight application that connects the data warehouse update management process to the Strategy cube update management process. It is easily deployed in minutes on a server, shared server or containerized environment and addresses many different cube refresh scenarios.

The MCST application is structured in five folders as shown below. Requests to refresh cubes can be submitted either by:

Here are examples of cube refresh use case scenarios. In each scenario, only one of the "name" or "id" values need to be supplied for the "event", "project", "folder" or "cube" elements.

Download mstr_cube_trigger.tar from the GitHub repository and extract to the desired home directory.
The configuration file <path>/mstr_cube_trigger/conf/mstr_cube_trigger_properties.json
is a json structure as below:
{ "mstr_cube_trigger_properties": { "mstr_library_url":"https://<host>/StrategyLibrary/api", "username":”<username>", "password":”<password>” "login_mode":1, "ssl_verify":0, "log_print_mode": "none" }}If the MCST application is to be used with cron, examine the included crontab to see an example of what to add to the cron schedule.
If the MCST application is to be run in a loop at startup, add the command mstr_cube_trigger_loop.sh to the startup scripts or service definition.
If the MCST application is to be used with an enterprise scheduler or workflow agent, configure the agent to run the mstr_cube_trigger.sh script with the json request message as an argument, as in the following examples, being mindful of the single and double quotes:
mstr_cube_trigger.sh '{"mstr_cube_trigger":[ {"event":{ "name": "RefreshCubeDemo"}}]}'mstr_cube_trigger.sh '{"mstr_cube_trigger":[ {"event":{"id": "<event GUID>" }}]}'mstr_cube_trigger.sh '{"mstr_cube_trigger":[{"project":{ "id":"<project GUID>"}, "cube":{ "id":"<cube GUID>", "skip if busy":"Y","block until published":"N","max block minutes":60}}]}'mstr_cube_trigger.sh '{"mstr_cube_trigger": [{ "project":{ "name": "<project>"}, "folder":{"name":"<project>/Public Objects/Reports/MSTR Cubes"},"cube":{"name":"MTDI Test Cube","skip if busy":"Y", "block until published":"N","max block minutes":60}}]}'
The log file, located in <path>/mstr_cube_trigger/log is called mstr_cube_trigger_log_<yyyymmdd>.json and has the yyyymmdd suffix automatically set every day, resulting in one log file per day.
Its contents are timestamped messages with status, method of refresh, request source, request content, updated request content.
There are 2 json log messages per request: the first shows request details and updated request with searched items filled in, and the second shows execution status, as in the example below:
FIRST LOG MESSAGE
{ "timestamp": "2022-06-17 23:10:16", "pid": 1730476, "message": { "incoming request": [ { "original": { "mstr_cube_trigger": [ { "event": { "name": "", "id": "" }, "project": { "name": "<project>", "id": "" }, "folder": { "name": "", "id": "<folder GUID>" }, "cube": { "name": "MTDI Test Cube", "id": "" } } ], "source": { "file": "/<path>/mstr_cube_trigger/requests/in_progress/20220617_231014_test_cube_name_test_min.json" } } }, { "updated": { "mstr_cube_trigger": [ { "event": { "name": "", "id": "" }, "project": { "name": "<project>", "id": "<project GUID>" }, "folder": { "name": "/<project>/Public Objects/Reports/MSTR Cubes", "id": "<folder GUID>" }, "cube": { "name": "MTDI Test Cube", "id": "<cube GUID>", "skip if busy": "Y", "block until published": "N", "max block minutes": 60 } } ], "source": { "file": "/<path>/mstr_cube_trigger/requests/in_progress/20220617_231014_test_cube_name_test_min.json" } } } ] }}
Example:
sh# mkdir appssh# tar xf mstr_cube_trigger.tar
Example:
sh# cd apps/mstr_cube_trigger/binsh# chmod +x *.shsh# ./make_link.sh
Example:
sh# cd apps/mstr_cube_triggersh# pip3 install -r requirements/requirements.txt
Example:
{ "mstr_cube_trigger_properties": { "mstr_library_url":"https://env-123456.customer.cloud.Strategy.com/StrategyLibrary/api", "username":”jdoe", "password":”mypass1” }} Example:
sh# echo '* * * * * /home/apps/mstr_cube_trigger/bin/mstr_cube_trigger_file.sh' >/etc/cron.d/mstr_cube_trigger
OR
Start MCST to run in a loop as described in earlier section
Example:
/home/apps/mstr_cube_trigger/bin/mstr_cube_trigger_loop.sh
OR
Enterprise workflow scheduler as described in earlier section
Example:
--Workflow:
RUN ON HOST 10.2.216.95 SCRIPT mstr_cube_trigger.sh '{"mstr_cube_trigger":[{"project":{ "id":"<project GUID>"}, "cube":{ "id":"<cube GUID>", "skip if busy":"Y","block until published":"N","max block minutes":60}}]}'
Example:
sh# /home/apps/mstr_cube_trigger/bin/mstr_cube_trigger.sh '{"mstr_cube_trigger":[{"project":{ "id":"<project GUID>"}, "cube":{ "id":"<cube GUID>", "skip if busy":"Y","block until published":"N","max block minutes":60}}]}'
Example:
sh# cat /home/apps/mstr_cube_trigger/log/cube_trigger_log_20220916.json