The cube press is a simple ad-hoc OLAP reporting system that will consume a Data Package and generate a set of pre-defined aggregated reports as static files.
The easiest way of using cubepress
is via PyPI:
$ pip install cubepress
Alternatively, check out the repository from GitHub and install it locally:
$ git clone https://github.com/openspending/cubepress.git
$ cd cubepress
$ pip install -e .
cubepress -p <datapackage> <aggregates.json>
where aggregates.json
is specified as a JSON list of aggregates
written in plain SQL:
[{
"sql": "SELECT admin, SUM(executed) as amount FROM 'table' WHERE year = 2006 GROUP BY admin",
"file": "by-department",
"format": "csv"
}]
Cubepress can also generate aggregates from specially written report YAML files.
nosetests tests/base.py
cubepress
is open source, licensed under a standard MIT license (included in this repository as LICENSE
).