[Mondrian] RE: drillThrough

Julian Hyde jhyde at pentaho.com
Fri Apr 9 14:12:54 EDT 2010


> Paul wrote:
>
> So what I would suggest is having a method drillThrough() - 
> that uses extended context = false by default, and the one 
> that lets me choose: drillThrough(boolean extendedContext)

There are a couple of problems with the extendedContext parameter. First, it
gives coarse-grained control over which columns come back, but some folks
have been asking to specify the columns more precisely.

Second, it is not easy to implement the parameter on other OLAP servers
(e.g. the olap4j driver for XMLA talking to SSAS).


SQL Server 2008's DRILL THROUGH syntax gives fine-grained control. E.g.

DRILLTHROUGH MAXROWS 100
SELECT
   ([Date].[Calendar].[Month].[July 2003])
ON 0 
FROM [Adventure Works]
WHERE [Geography].[Country].[Australia]
RETURN 
  [$Date].[Date]
  ,KEY([$Product].[Model Name])
  ,NAME([$Employee].[Employee])
  ,[Reseller Sales].[Reseller Sales Amount]
  ,[Reseller Sales].[Reseller Tax Amount]
  ,[Reseller Sales].[Reseller Standard Product Cost]

http://technet.microsoft.com/en-us/library/ms145964.aspx

I think that olap4j should implement that specification:

Cell.drillThrough(
  int maxRowCount, // < 0 means no limit
  String columnList // comma-separated list of columns, or null to return
default
);

The above example would be

Cell cell; // cell pointing at ([July 2003], [Australia])
ResultSet rset = cell.drillThrough(
    100,
    "[$Date].[Date]"
    + ",KEY([$Product].[Model Name])"
    + ",NAME([$Employee].[Employee])"
    + ",[Reseller Sales].[Reseller Sales Amount]"
    + ",[Reseller Sales].[Reseller Tax Amount]"
    + ",[Reseller Sales].[Reseller Standard Product Cost]");

You can of course have an 'extended context' check box in PAT, if you wish.
If checked, you would generate a columnList including all levels of all
dimensions.

This would of course require a change to mondrian. But it's a change we've
been intending to make for some time. I'd rather this than to bake the
mondrian-specific 'extendedContext' into olap4j.

Julian




More information about the Mondrian mailing list