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.
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
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()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.