[openspending-dev] Fwd: OS to Cubes mapping

Friedrich Lindenberg friedrich.lindenberg at okfn.org
Wed May 30 17:37:19 UTC 2012


Hey,

On Tue, May 29, 2012 at 7:38 PM, Stefan Urbanek
<stefan.urbanek at gmail.com> wrote:
> On Tue, May 29, 2012 at 12:46 AM, Stefan Urbanek
> <stefan.urbanek at gmail.com> wrote:
>
> Was not able to go to sleep before I have finished this:
>
>
> Generate model: https://gist.github.com/2821496
>
> Get slicer.ini: https://gist.github.com/2821497
>
>
> run:
>
>
> slicer serve slicer.ini
>
>
> and:
>
>
> curl "http://localhost/aggregate"
>
>
> Notes:
>
>
> * model looks overcomplicated because OS and Cubes have different naming
>
> schema (Cubes uses prefix_<cube_name> vs. OS <cube_name>__entries and
>
> prefix_<dim_name> vs. <cube_name>__<dim_name>. In Cubes dimensions are
>
> shared within model. That is why currently there has to be explicit mapping
>
> for every single attribute. See [1]

So basically all cubes share the dimensions? Do you think this would
have advantages for us as well? It seemed a bit hard to do this from
an access control point of view, but it may make sense - we would
otherwise have to introduce some high-level mapping some time to link
up the same dimension in different datasets.

> * "date" is not yet converted (is ignored), as it is too late, fingers are
>
> heavy, keyboard soft and screen is dimming in front of me.

:)

> * cubes introduced new checking for string-cut conversions, that every
>
> dimension key has to have form of identifier (alphanumeric and underscore).
>
> might work if requested as /report with POST json (see [2]), not tested. I
>
> should probably introduce URL encoding.

I don't get this, can you clarify it a bit?


> [1] http://packages.python.org/cubes/mapping.html
>
> [2] http://packages.python.org/cubes/server.html#reports
>
>
> just wanted to try it :-)

Very cool hack :)

- Friedrich




More information about the openspending-dev mailing list