EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

mstrio for dummies


Robert Prochowicz

Manager, Sales Engineering • MicroStrategy


After watching this 3 minutes video you will be able to test mstrio library (based on REST API) yourself. Even without coding skills.

After watching this 3 minutes video you will be able to test mstrio library (based on REST API) yourself.  You will be able to:
- connect to Strategy Server
- pull data out of it
- modify the data a little bit
- push data back to Strategy and save it as a new cube
Python coding is short, minimal and easy to understand. There is no need to install anything. Just ask your buddy SE for a user name and password to any Strategy AWS instance. Then replace the credentials in the code. And your dataset ID.
You will use free service from Google Colaboratory to execute the mstrio code.
All the code used in this demo:


!pip install mstrio-py

from mstrio import Strategy
conn = Strategy.Connection(base_url="YOUR_SERVER_URL/StrategyLibrary/api", username="xxx", password="xxx", project_name="Strategy Tutorial")
conn.connect()

%%time
report_dataframe = conn.get_report(report_id='xxx')

report_dataframe.shape

report_dataframe.head(5)

report_dataframe['Plan'] = (1.5 * report_dataframe['Sales']).round(1)

newDatasetId, newTableId = conn.create_dataset(data_frame=report_dataframe, dataset_name='Plan_2019', table_name='Plan_table', to_attribute=['Region', 'Employee'])


Comment

0 comments

Details

Example

Published:

February 22, 2019

Last Updated:

February 22, 2019