These release notes cover the new features and changes (some of them backward incompatible).
The biggest new feature in cubes is the “pluggable” model. You are no longer limited to one one model, one type of data store (database) and one set of cubes. The new Workspace is now famework-level controller object that manages models (model sources), cubes and datastores. To the future more features will be added to the workspace.
New Workspace related objects:
For more information see the Workspace documentation.
Other notable new features in Cubes 1.0 are:
The old backend architecture was limiting. It allowed only one store to be used, the model had to be known before the server started, it was not possible to get the model from a remote source.
For more details about the new workspace see the Analytical Workspace documentation.
The slicer.ini configuration has changed to reflect new features.
The section [workspace] now contains global configuration of a cubes workspace session. The database connection has moved into [store] (or similar, if there are more).
The database connection is specified either in the [store] section or in a separate stores.ini file where one section is one store, section name is store name (as referenced from cube models).
If there is only one model, it can be specified either in the [workspace] section as model. Multiple models are specified in the [models] section.
To sum it up:
The old configuration:
[server]
host: localhost
port: 5000
reload: yes
log_level: info
[workspace]
url: postgres://localhost/mydata"
[model]
path: grants_model.json
Is now:
[workspace]
log_level: info
model: grants_model.json
[server]
host: localhost
port: 5000
reload: yes
[store]
type: sql
url: postgres://localhost/mydata
Check your configuration files.
See also
Slicer server is now a Flask application and a reusable Blueprint. It is possible to include the Slicer in your application at an end-point of your choice.
For more information, see the recipe.
Other server changes:
Server end-points have changed.
New end-points:
Removed end-points:
Parameter changes:
Response changes:
See also
Support for thee types of joins was added to the SQL backend: match (inner), master (left outer) and detail (right outer).
The outer joins allows for example to use whole date dimension table and have “empty cells” for dates where there are no facts.
When an right outer join (detail method) is present, then aggregate values are coalesced to zero (based on the function either the values or the result is coalesced). For example: AVG coalesces values: AVG(COALESCE(c, 0)), SUM coalesces result: COALESCE(SUM(c), 0).
Module with statistical aggregate functions such as simple moving average or weighted moving average.
Provided functions:
The function are applied on the already computed aggregation results. Backends migh handle the function internally if they can.
Both invert and split features are still provisional, their interface might change.
Model and modeling related changes are:
Note
cubes, dimensions, levels and hierarchies can no longer be dictionaries, they should be lists of dictionaries and the dictionaries should have a name property set. This was depreciated long ago.
The models of cubes are now being created by the model providers. Model provider is an object that creates Cubes and Dimension instances from it’s source. Built-in model provider is cubes.StaticModelProvider which creates cubes objects from JSON files and dictionaries.
See also
Cubes now distinguishes between measures and aggregates. measure represents a numerical fact property, aggregate represents aggregated value (applied aggregate function on a property, or provided natively by the backend).
This new approach of aggregates makes development of backends and cliends much easier. There is no need to construct and guess aggregate measures or splitting the names from the functions. Backends receive concrete objects with sufficient information to perform the aggregation (either by a function or fetch already computed value).
Functionality additions and changes:
Implicit aggregate record_count is no longer provided for every cube. It has to be explicitly defined as an aggregate:
"aggregates": [
{
"name": "item_count",
"label": "Total Items",
"function": "count"
}
]
It can be named and labelled in any way.
Checklists for migrating a Cubes project from pre-1.0 to 1.0:
The minimal configuration looks like:
[store]
type: sql
url: sqlite:///data.sqlite
[models]
main: model.json
See configuration changes for an example and configuration documentation for more information.
There are not many model changes, mostly measures and aggregates related.
"aggregates": [ { "name": "record_count", "label": "Total Items", "function": "count" } ]
See Aggregates for more information.
The biggest change in the front-ends is the removal of the /model end-point without equivalend replacement. Use /cubes to get list of provided cubes. The cube definition contains whole dimension descriptions.
Refer to the OLAP Server documentation for the new response structures. There were minor changes, mostly additions.