These are chat archives for DataBrewery/cubes

27th
May 2016
voldesh
@voldesh
May 27 2016 06:54
[Solved] I was using Django 1.1. Upgraded to 1.7 and works just fine ! :smile:
voldesh
@voldesh
May 27 2016 07:02
Another issue I was facing in the cubes is that I have two tables with totally different columns and I would like to use both the tables from sqlite DB in one single cube.
I am right now implementing it using two different cubes. It works fine. But, what if I want to use both the tables in one cube... how would I attempt to do that?
Jose Juan Montes
@jjmontesl
May 27 2016 10:39
You can join several tables. Often you'd have many tables for a single cube.
This is done between the "join" and the "mappings" section of model.js.
Ie, my cube "census" uses:
...
{
"alias": "nationality",
"detail": "ine_nationality.id",
"master": "ine_census.nationality_id"
},
{
"alias": "genre",
"detail": "ine_genre.id",
"master": "ine_census.genre_id"
}, ...
And then, the mappings:
            "genre.genre": "genre.genre",
            "genre.id": "genre.id",
            "nationality.id": "nationality.id",
            "nationality.nationality": "nationality.nationality"
Jose Juan Montes
@jjmontesl
May 27 2016 10:45
Finally, read about traditional schemas used for datamining, although Cubes doesn't require this (you can map arbitrary schemas), I recommend to learn a bit about how data is usually structured for analytical processing: https://en.wikipedia.org/wiki/Star_schema and https://en.wikipedia.org/wiki/Snowflake_schema .
voldesh
@voldesh
May 27 2016 12:38
Can you give me a practical model to examine joins and mappings ?
Thanks, btw! :smile:
Jose Juan Montes
@jjmontesl
May 27 2016 14:21
Note that the documentation refers to some URLs that are not yet available, because it's being updated for CubesViewer 2.0, but will be available within 1 week. The model.json, slicer.ini and sqlite database are valid.