{"id":19756411,"url":"https://github.com/mara/mara-mondrian","last_synced_at":"2025-04-30T11:33:30.951Z","repository":{"id":56642222,"uuid":"272408699","full_name":"mara/mara-mondrian","owner":"mara","description":"A python integration for the Saiku ad hoc analysis tool","archived":false,"fork":false,"pushed_at":"2021-01-23T23:11:56.000Z","size":83111,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-06T01:41:19.298Z","etag":null,"topics":["adhoc-analysis","data","mara","mondrian","mondrian-olap-engine","python","reporting","saiku"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mara.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-15T10:26:40.000Z","updated_at":"2023-05-04T20:09:41.000Z","dependencies_parsed_at":"2022-08-15T22:31:04.523Z","dependency_job_id":null,"html_url":"https://github.com/mara/mara-mondrian","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mara%2Fmara-mondrian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mara%2Fmara-mondrian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mara%2Fmara-mondrian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mara%2Fmara-mondrian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mara","download_url":"https://codeload.github.com/mara/mara-mondrian/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251691625,"owners_count":21628358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adhoc-analysis","data","mara","mondrian","mondrian-olap-engine","python","reporting","saiku"],"created_at":"2024-11-12T03:15:50.157Z","updated_at":"2025-04-30T11:33:25.938Z","avatar_url":"https://github.com/mara.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Mara Mondrian\n\n[![Build Status](https://travis-ci.org/mara/mara-mondrian.svg?branch=master)](https://travis-ci.org/mara/mara-mondrian)\n[![PyPI - License](https://img.shields.io/pypi/l/mara-mondrian.svg)](https://github.com/mara/mara-mondrian/blob/master/LICENSE)\n[![PyPI version](https://badge.fury.io/py/mara-mondrian.svg)](https://badge.fury.io/py/mara-mondrian)\n[![Slack Status](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack\u0026style=social)](https://communityinviter.com/apps/mara-users/public-invite)\n\nA python interface for [Mondrian Server](https://github.com/project-a/mondrian-server), a [Mondrian](https://en.wikipedia.org/wiki/Mondrian_OLAP_server) [XMLA](https://en.wikipedia.org/wiki/XML_for_Analysis) server combined with the [Saiku](https://www.meteorite.bi/products/saiku/) ad hoc analysis tool. Comes with\n\n- A Makefile for running Mondrian Server locally.\n\n- [Mondrian schema](https://mondrian.pentaho.com/documentation/schema.php) generation from a [Mara Schema](https://github.com/mara/mara-schema) definition.\n\n- Mondrian cache flushing.\n\n- Saiku authentication via [Mara ACL](https://github.com/mara/mara-acl). \n\n\n\n\u0026nbsp;\n\n## Installation\n\nTo use the library directly, use pip:\n\n```\npip install mara-mondrian\n```\n\nor\n \n```\npip install git+https://github.com/mara/mara-mondrian.git\n```\n\nFor an example of an integration into a flask application, have a look at the [mara example project 1](https://github.com/mara/mara-example-project-1).\n\n\u0026nbsp;\n\n## Running Saiku\n\nFrom within a project, include [.scripts/mondrian-server.mk](https://github.com/mara/mara-mondrian/tree/master/.scripts/mondrian-server.mk) in your project Makefile (as for example in [https://github.com/mara/mara-example-project-1/blob/master/Makefile](https://github.com/mara/mara-example-project-1/blob/master/Makefile)).\n\nRunning `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: \n\n![Saiku](docs/saiku.png)\n\nFor running Mondrian Server in production, please have a look at [https://github.com/project-a/mondrian-server/blob/master/README.md](https://github.com/project-a/mondrian-server/blob/master/README.md).\n\n\u0026nbsp;\n\n## Features\n\n### Mondrian schema generation\n\nIf you have a data warehouse schema defined in [Mara Schema](https://github.com/mara/mara-schema), then you can automatically create a Mondrian schema file using the function `write_mondrian_schema` in [mara_mondrian/schema_generation.py](mara_mondrian/schema_generation.py).\n\nHave a look at [https://github.com/mara/mara-example-project-1/blob/master/app/pipelines/update_frontends/\\_\\_init\\_\\_.py](https://github.com/mara/mara-example-project-1/blob/master/app/pipelines/update_frontends/__init__.py) for an example.\n\n\u0026nbsp;\n\n### Mondrian cache flushing\n\nThe function `flush_mondrian_cache` in [mara_mondrian/connection.py](https://github.com/mara/mara-mondrian/tree/master/mara_mondrian/connection.py) triggers a reload of the schema and a flushing of all caches in Mondrian Server.\n\nThis file also contains functions for making XMLA requests. \n\n\u0026nbsp;\n\n### Saiku authentication via [Mara ACL](https://github.com/mara/mara-acl)\n\nOnce you add the Saiku ACL resource in [mara_mondrian/views.py](https://github.com/mara/mara-mondrian/tree/master/mara_mondrian/views.py) to your project, you can easily control which users can query which cubes:\n\n![Saiku ACL](docs/acl.png)\n\nIn 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\").\n\nPlease have a look at [https://github.com/project-a/mondrian-server/blob/master/README.md](https://github.com/project-a/mondrian-server/blob/master/README.md) for how to set this up.\n\nPlease 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](https://github.com/mara/mara-example-project-1/blob/master/app/ui/__init__.py):\n\n```python\nmonkey_patch.patch(mara_acl.config.whitelisted_uris)(lambda: ['/mara-app/navigation-bar', '/mondrian/saiku/authorize'])\n```\n\n\u0026nbsp;\n\nThe easiest way to try out Mara Mondrian is to run the [mara example project 1](https://github.com/mara/mara-example-project-1).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmara%2Fmara-mondrian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmara%2Fmara-mondrian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmara%2Fmara-mondrian/lists"}