PDA

View Full Version : DrillThroughSQL - again...



uramisten
07-27-2003, 12:15 AM
Apparently a nice drillthrough interface (+charting) has been developed for jpivot (next version). It does, however, still use the (broken) getDrillThroughSQL() function...
We are working with a snowflake database and since the fact table contains just a bit of info, the rest being in linked tables, it would be useful (vital) to be able to specify/modify the default SQL (or pattern/template thereof) returned by getDrillThroughSQL(). Basically what I mean here is that the developer could specify (maybe in the schema.xml?) the base select would look like
select TABLE1.fielda, TABLE2.field2, ... , FACT.field1, FACT.field2 from TABLE1, TABLE2, FACT where ________ <-- here comes the FACT table filter where, and the custom table linking logic...
.. although I guess it could be derived from the dimensions present in the cube.,. hmm.. maybe thats a better approach? any ideas/suggestions?
cheers!!!

robinbagot
08-05-2003, 07:59 AM
The getDrillThroughSQL() method has been changed to getDrillThroughSQL(boolean), if parameter is true, it adds to the query all the dimensions that have the level "All" for the cell.
I'm not sure what will happen with a snowflake schema. Maybe could you try it with the latest mondrian source?
I agree it would be nice to have more control over which dimensions are included - I think that is what you are saying? So that you can set a meaningful context for the drill through data?
That would be a good idea, but it should also be flexible enough to allow customising by the user, so therefore I think schema.xml is probably not the best place, it also doesn't need to be in SQL. A simple user interface with a default setting of all dimensions would be my preference.
Is this a big problem or is there a specific problem with a snowflake schema?
If you need much more control of the drill through, you could modify the mondrian specific conde in jpivot. In jpivot, the drill through table (now) does not rely on the mondrian drill through methods. There is a method jpivot.mondrian.MondrianDrillThrough and a class MondrianDrillThroughTable that produce a wcf.TableModel from the SQL provided by mondrian. You could customise this to provide different drill through data, it could even be from a different data source.
Again this is in the latest souce, there is not reales yet, but I think there might be soon, there is some development source here if you care to try that:
http://home.chiedo.co.uk/public/jpivot/jpivot-robin.zip
Regards,
Robin