0

I'm using Mondrian 3.4 as the Olap Server to my application written in Java. Currently i wanted to perform some typical Olap operations in a cube, but i could't find any pointers that guided me to how to perform a drilldown operation in a cube with Mondrian. I could't find methods in the Mondrian API to do this. Is this possible? How should i do it?

Thks in advance.

Paulo Rodrigues
  • 593
  • 14
  • 32

2 Answers2

0

I think you can check MDDataSet_Tabular inner class within mondrian.xmla.XmlaHandler, it provides API functions to store dimension values and names into MDDataSet object when you perform drilldown operation. I'm using Mondrian 3.1, but I think the source code should be the same in 3.4.

If you have additional problem, please let me know.. Good luck

bhuang3
  • 3,493
  • 2
  • 17
  • 17
0

There are two ways to do a drilldown. You can either get a drilldown a MDX query, or a drilldown of a particular cell.

To run a drilldown query, in olap4j, you do:

ResultSet rs =
    olapConnection.createStatement().executeQuery(
        "DRILLTHROUGH\n"
        + "SELECT {[Measures].[Unit Sales]} on columns\n"
        + "from [Sales]\n"
        + "where ([Promotions].[One Day Sale],\n"
        + " [Store].[Store City].[Walla Walla],\n"
        + " [Product].[Product Category].[Bread])\n"
        + "RETURN [Customers].[Name], [Gender].[Gender]");

The RETURN clause is optional and specifies which fields you want returned. To drilldown on a particular cell, you run a query, access the cell you want and call:

org.olap4j.Cell.drillthrough()
Luc
  • 672
  • 3
  • 8
  • First of all, thanks for your response. I believe that i want the drilldown of a particular cell. If i execute this method Cell.drillthrough(), is there any way that i can get the MDX query that Mondrian executes without checking it's logs? And about the roll up operation, is there any method exposed by the api to do it? or i just have to save the history of my drill downs in order to do the corresponding roll ups? – Paulo Rodrigues Dec 26 '12 at 19:35