Skip to content

Instantly share code, notes, and snippets.

@pstoellberger
Created July 31, 2012 14:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pstoellberger/3217340 to your computer and use it in GitHub Desktop.
Save pstoellberger/3217340 to your computer and use it in GitHub Desktop.
Saiku Parameters (Experimental)
There is also a rudimentary parameter support in the latest saiku version.
You can find the latest version on our CI server:
plugin: http://ci.analytical-labs.com/job/saiku-plugin/
standalone: http://ci.analytical-labs.com/job/saiku-server/
You can then create a new mdx query
could be something like:
SELECT Measures.Sales on ROWS,
Organisations.[Test] on COLUMNS
from [Organisations]
save it as "paramquery"
open the file in tomcat/webapps/saiku/WEB-INF/classes/saiku-repository/paramquery.saiku
you should see your mdx there
replace "Organisations.[Test]" with Organisations.[${ORG}] (the variable needs to be UPPER CASE)
open saiku like that:
http://localhost:8080/?paramorg=MyOrg&plugin=true#query/open/param.saiku
or in case of the plugin open the saiku query in a new window and insert the parameter ..../content/saiku........&paramorg=MyOrg#query/open.....
you can also save the drag and drop query, but the xml will look a bit different.
its easy to read, and you can change parts of it just like for mdx queries that will be replaced by the URL parameters
We are currently reworking some inner parts of saiku that will expose a much better parametrisation API for the next version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment