DataBrewery / cubes

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

Remove cube from Cell #407

Closed martianboy closed 7 years ago

martianboy commented 7 years ago

It's only used to convert dimension name to Dimension object, which is not necessary anymore.

Stiivi commented 7 years ago

Thank you. As briefly mentioned on the Gitter channel, this looks like a part of bigger change. Let's discuss it in #401.

Stiivi commented 7 years ago

We should move towards the "string" oriented, light-weight cells that are checked against model in the query builder. The #408 describes the proposed changes in more details.

I'll merge this if we use strings instead of objects such as Dimension.

Problem is that the dimension is used indirectly mostly in the browser. Quick grep and usage tracing in the source reveals:

martianboy commented 7 years ago

@Stiivi Cell.contains_level is used in Drilldown.high_cardinality_levels. And as for query/browser.py, you're right. These functions depend on cell.cube. Then should we pass cube directly to Drilldown and other functions?

For now, I just changed dimension and hierarchy properties in Cuts to string.

Stiivi commented 7 years ago

@martianboy Thank you for the changes. This still needs some work, but this change is great start.

Re: pass cube to Drilldown yes if we stay with current structures.