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

  1. Log in to Library and create a Dashboard.
  2. In the Datasets panel, click New Data.
  3. In the New Dataset window, next to Data Catalog click to create a new Data Source.
  4. In the Data Source Types window, select Python Query.

  5. Next to Name, enter a title for the data source.
  6. From the Python Runtime drop-down list, select a Python Runtime.

  7. Configure the database connection, and then click Save.
  8. From the Data Source drop-down list, select the Python Query data source.
  9. 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.

  10. Click Add Table.
  11. Click Prepare Data or Save to publish the cube.

Related Topics

Create and Edit Python Runtimes