-1

I have an OLAP cube on SSAS (and XMLA script for processing). How can I call processing it via Python script? The only things I can find are about getting data from cubes (mdx/etc), and some popular libraries are really old (for example, xmla was last updated in 2013).

1
  • Please provide enough code so others can better understand or reproduce the problem. Commented Oct 27, 2023 at 9:09

1 Answer 1

0

For loading pd df with mdx query you can use mdx-to-pd. You will provide the mdx query and connection and it will return the dataframe you will need powerbi installed and you will need to have access to cube

from mdx_to_pd import mdx_retriever

connection = "Data Source=https://biserver.company.com/database/;Catalog=Model;"
query = """
        SELECT NON EMPTY [Measures].[Order Count] ON COLUMNS,
        NON EMPTY ([Markets].[Country].[Country]) ON ROWS
        FROM [OLAP_CUBE]
        """
# returns pd.DataFrame()

df = mdx_retriever(query, connection)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.