DataBrewery / cubes

[NOT MAINTAINED] Light-weight Python OLAP framework for multi-dimensional data analysis
http://cubes.databrewery.org
Other
1.49k stars 313 forks source link

Enhancement - manage sparse fact tables #484

Open ThamaluM opened 4 years ago

ThamaluM commented 4 years ago

When the fact table is sparse (There are no facts for some dimension points) drilldown results do not contain the aggregates corresponding to dimension points which are not represented in fact table rows. (Those aggregations want to be represented as zeros)

Outer join the dimension table or the "detail method" will work but there is another problem. When there is a cut from another dimension these aggregates are missing again. (Due to WHERE condition rows added by outer join are ruled out because other columns are empty.)

Appropriate suggestion is to change cut parameters to Join condition ( for example a.dateid=b.id and b.product='PIZZA')

To implement this in a general way is hard. However it is better if we have this feature at least for time role. All cuts except time cuts come into the join condition and time cuts are in the where condition.