MicroStrategy ONE

Create and Edit Python Runtimes

Python scripts normally run on a user’s computer. Newer containerized environments allow you to run scripts directly in a MicroStrategy environment without the need to leave a computer running. You can save your scripts in these environments and access them anywhere within Workstation, as well as provide access to other administrators.

You must have the Manage runtime privilege and your environment must support Python server-side script execution. Currently, the support of server-side script execution is turned on for containerized environments only.

  1. Open the Workstation window and connect to an environment.
  2. In the Navigation pane, click Monitors.

  3. In the left pane, click Runtimes.

    Here you can see and manage currently existing runtimes. All environments have a default runtime. When creating a runtime you can manage its name, description, addresses it can connect to, packages installed on it, and size for script execution.

Why should I change the runtime size?

The default runtime size may not be sufficient for your script's memory needs. By increasing the runtime size, you can ensure that your script has enough memory to run without errors or crashes. For example, when using a script to create a data source, it is best to use larger runtimes, since a script used to create tables could load them into memory.

What are the risks involved in using a large environment?

A large containerized environment can also consume a lot of memory, which can lead to performance issues on the host machine and potentially cause the container to crash. MicroStrategy containers have limited memory for Python runtimes (currently limited to 6 vCPU and 20 GB of memory for containerized environments). It's important to regularly assess the size and complexity of your container environment and make sure it aligns with your performance, security, and maintenance requirements. It would be best to run administrative scripts on smaller runtimes to reduce resource usage.