A python integration for the Saiku ad hoc analysis tool
A Makefile for running Mondrian Server locally.
Mondrian cache flushing.
Saiku authentication via Mara ACL.
To use the library directly, use pip:
pip install mara-mondrian
pip install git+https://github.com/mara/mara-mondrian.git
For an example of an integration into a flask application, have a look at the mara example project 1.
From within a project, include .scripts/mondrian-server.mk in your project Makefile (as for example in https://github.com/mara/mara-example-project-1/blob/master/Makefile).
make setup-mondrian-server will create the required
mondrian-server.properties file. And then running
make run-mondrian-server will start Saiku and the XMLA server on port 8080:
For running Mondrian Server in production, please have a look at https://github.com/project-a/mondrian-server/blob/master/README.md.
Mondrian schema generation
Have a look at https://github.com/mara/mara-example-project-1/blob/master/app/pipelines/update_frontends/__init__.py for an example.
Mondrian cache flushing
flush_mondrian_cache in mara_mondrian/connection.py triggers a reload of the schema and a flushing of all caches in Mondrian Server.
This file also contains functions for making XMLA requests.
Saiku authentication via Mara ACL
Once you add the Saiku ACL resource in mara_mondrian/views.py to your project, you can easily control which users can query which cubes:
In this example, users from the "Management" group can query all cubes, and users from "Marketing" only "Customers" and "Leads" (with the exception of Thomas who can also query "Order items" and "Sellers").
Please have a look at https://github.com/project-a/mondrian-server/blob/master/README.md for how to set this up.
Please make sure that the
/mondrian/saiku/authorize endpoint is white-listed from the Mara ACL, as for example in https://github.com/mara/mara-example-project-1/blob/master/app/ui/__init__.py:
monkey_patch.patch(mara_acl.config.whitelisted_uris)(lambda: ['/mara-app/navigation-bar', '/mondrian/saiku/authorize'])
The easiest way to try out Mara Mondrian is to run the mara example project 1.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.