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
-
Open the Workstation window.
-
Connect to an environment.
- In the Navigation pane, click , next to Data Sources.
-
Click Python.
-
Enter a Name and Description.
- Click Add New Database Connection:
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.
Click Settings and choose the Create and Edit Python Runtimes to run the Python data source script.
Click $ Variables in the right panel and click Add Variable.
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
.Click Save and Close.
-
Select a Project.
Testing is not supported for data sources created with Python scripts
-
Click Save.
You can now use the data source to Import Data from a Python Data Source.