Strategy ONE
Import Data From Python Query Data Source
Starting in Strategy One (June 2025), a Python Query data source was added enabling users to establish connections to web services using Python queries, replacing the need for XQuery.
Prerequisites
-
The Python Query Report is dependent on the Python Service functionality.
- Python Service is available for use in containerized environments as well as uncontainerized Managed Cloud Enterprise (MCE) deployments.
- To enable this feature, contact Strategy Support for assistance.
-
Required Privileges:
- Use Scripts Python
- Certify Python Scripts
- Use Freeform SQL
Data Import in Library
- Log in to Library and create a Dashboard.
- In the Datasets panel, click New Data.
- In the New Dataset window, next to Data Catalog click
to create a new Data Source.
-
In the Data Source Types window, select Python Query.
- Next to Name, enter a title for the data source.
-
From the Python Runtime drop-down list, select a Python Runtime.
- Configure the database connection, and then click Save.
- From the Data Source drop-down list, select the Python Query data source.
-
In the Python Editor, enter your Python code, and then click Run to display the data in the Sample Preview pane.
The Python code must contain a function called get_data() with a data frame object returned, as shown in the example below.
- Click Add Table.
- Click Prepare Data or Save to publish the cube.