PDA

View Full Version : dynamic cubes...



uramisten
07-11-2003, 12:53 AM
Would it be feasible to generate the definition xml (eg foodmart.xml) files on the fly, say with a servlet for example? this would allow you to programatically specify roles and dimensions available in a given cube depending on e.g: the user authenticated etc..
is there some overhead that I don't know about that would make this a problem, or are the cubes in any case generated on a session basis?
Cheers
Ati.

jhyde
07-17-2003, 08:52 PM
Yes, it would. Two approaches are possible.
First, since the catalog is a URL, you could make it a URL -- say a JSP page -- which generates an XML document according to supplied parameters.
Or you could use code in the application server which first establishes a Mondrian connection, then uses the programmatic API to create or alter the schema. Schema.createDimension() is an example of the kind of method you can call.
Roles are a great way of customizing the schema depending upon who is logged in. Since Mondrian does not support authentication itself, if you allow end-users to supply the full connect string, they would easily be able to circumvent the access-control offered by roles. So, as you guessed, the a better way to use roles is to use programmatic code which figures out the appropriate role for the authenticated user, then applies the role to the connection.

uramisten
03-28-2004, 11:47 PM
I need to dynamically change the roles used by users, and had planned to use a generate role name with different permissions for each user (custom generated, based on userid). Problem is that the jpivot's catalogURI seems to be only willing to accept a file - local URI....
I can change it (been doing a lot of jpivot mods lately), but if I change it, would mondrian accept a catalog URI like:
"
http://localhost/Olap/servlet/XMLgen
"
where XMLgen is a servlet which returns the XML with the appropriate generated role?
Ati