MicroStrategy / mstrio-py

Python integration for MicroStrategy
Apache License 2.0
90 stars 60 forks source link

Impossibility to import intelligent cube #46

Closed LLejoly closed 3 years ago

LLejoly commented 3 years ago

We are facing some problems to import an intelligent cube (previously generated by another python script) in our Python script. However, we do not have any problem to import reports and upload new Cubes on the Microstrategy platform.

We followed the procedure described on the repo to load a Cube but we have an error saying the Cube ID is not correct. We checked the cube ID and this one is correct.

The error message is the following one.

Error getting cube metadata information. Check Cube ID.
I-Server Error ERR001, (The data source (Cube Server) has not been initialized)

The code used is:

connection = Connection(url, usr_name, usr_password, project_id=project_id) <-- connection correctly established
my_cube = Cube(connection=connection, cube_id=cube_id)
my_cube = my_cube.to_dataframe
LLejoly commented 3 years ago

I tested the REST API with POSTMAN with the same parameters and it is working.

The error is in the Cube class where the get Query is not correct anymore.

The api/cubes.py file must be edited to simply remove the function self.__info(). Indeed, Based on the official documentation this query does not exist anymore. You can still have /api/cubes/{cube_id}. However, the metadata returned are missing.

This part should be removed.

LLejoly commented 3 years ago

Hotfix proposed #47

OskarDuda commented 3 years ago

Hi @LLejoly , thanks for the heads up and double thanks for the proposed solution. We'll look into the issue and implement a fix ASAP! :D

OskarDuda commented 3 years ago

@LLejoly Could you please specify on which version of Microstrategy this issue occured?

LLejoly commented 3 years ago

Version impacted 11.3.0.2

OskarDuda commented 3 years ago

@LLejoly thanks for bringing this up! We've created an action item and will include a fix for this issue within our release plans.