MicroStrategy ONE

Create a Python Data Source

Starting in MicroStrategy ONE Update 11, you can create a Python data source in MicroStrategy Cloud Environments.

Prerequisites

  • Ensure your environment supports the Python server-side script execution

    This feature is supported on the MicroStrategy Cloud Environment. Contact MicroStrategy Support to enable the feature.

  • You must have the Use Script Python privilege.

Create a Python Data Source

  1. Open the Workstation window.

  2. Connect to an environment.

  3. In the Navigation pane, click , next to Data Sources.
  4. Click Python.

  5. Enter a Name and Description.

  6. Click Add New Database Connection:
    1. Find a script template for your data source script in Gallery. Write your python script in the left panel to retrieve data from your data source. For more information, see Write a Python Data Source Script.

    2. Click Settings and choose the Create and Edit Python Runtimes to run the Python data source script.

    3. Click $ Variables in the right panel and click Add Variable.

    4. Expand Variable Settings to change variable type.

      To use to variable in the script, enter its name preceded by a dollar sign ($). For example, $Token.

    5. Click Save and Close.

  7. Select a Project.

    Testing is not supported for data sources created with Python scripts

  8. Click Save.

You can now use the data source to Import Data from a Python Data Source.