2014-02-25 by Stefan Urbanek

Welcome Robin and Thanks to Squarespace

Before the upcoming 1.0 release, I would like to introduce Cubes core developer Robin Thomas. Robin is experienced data warehouse engineer with profound knowledge of OLAP and multidimensional modeling. Robin and his team did a great job, contributed many new features and concepts.

We have quite a lot of new features and ideas thanks to Robin. Just to name a few:

  • new, completely rewritten Mongo backend
  • authorization and authentication
  • non-additive time dimension
  • statistical functions

and many more.

Thanks and credit goes also to: Brad Willard, Mathew Thomas, Ryan Berlew, Andrew Bartholomew and Emily Wagner.

In addition, I would like to thank Squarespace for their kindness and for contributing their additions back to the community as open-source.

2013-02-20 by Stefan Urbanek

Cubes 0.10.2 Released - Even More Hierarchies, Formatters and Docs

After few months and gloomy winter nights, here is a humble update of the Cubes light weight analytical framework. No major feature additions nor changes this time, except some usability tweaks and fixes.

Documentation was updated to contain relational database patterns for SQL backend. See the schemas, models and illustrations in the official documentation.

Also improvements in cross-referencing various documentation parts through see-also for having relevant information at-hand.

Thanks and credits for support and patches goes to:

  • Jose Juan Montes (@jjmontesl)
  • Andrew Zeneski
  • Reinier Reisy Quevedo Batista (@rquevedo)

Summary

  • many improvements in handling multiple hierarchies
  • more support of multiple hierarchies in the slicer server either as parameter or with syntax dimension@hierarchy:
  • dimension values: GET /dimension/date?hierarchy=dqmy
  • cut: get first quarter of 2012 ?cut=date@dqmy:2012,1
  • drill-down on hierarchy with week on implicit (next) level: ?drilldown=date@ywd
  • drill-down on hierarchy with week with exlpicitly specified week level: ?drilldown=date@ywd:week
  • order and order attribute can now be specified for a Level
  • optional safe column aliases (see docs for more info) for databases that have non-standard requirements for column labels even when quoted

New Features

  • added order to Level object - can be asc, desc or None for unspecified order (will be ignored)
  • added order_attribute to Level object - specifies attribute to be used for ordering according to order. If not specified, then first attribute is going to be used.
  • added hierarchy argument to AggregationResult.table_rows()
  • str(cube) returns cube name, useful in functions that can accept both cube name and cube object
  • added cross table formatter and its HTML variant
  • GET /dimension accepts hierarchy parameter
  • added create_workspace_from_config() to simplify workspace creation directly from slicer.ini file (this method might be slightly changed in the future)
  • to_dict() method of model objects now has a flag create_label which provides label attribute derived from the object's name, if label is missing
  • Issue #95: Allow charset to be specified in Content-Type header

SQL:

  • added option to SQL workspace/browser safe_labels to use safe column labels for databases that do not support characters like . in column names even when quoted (advanced feature, does not work with denormalization)
  • browser accepts include_cell_count and include_summary arguments to optionally disable/enable inclusion of respective results in the aggregation result object
  • added implicit ordering by levels to aggregate and dimension values methods (for list of facts it is not yet decided how this should work)
  • Issue #97: partially implemented sort_key, available in aggregate() and values() methods

Server:

  • added comma separator for order= parameter
  • reflected multiple search backend support in slicer server

Other:

  • added vim syntax highlighting goodie

Changes

  • AggregationResult.cross_table is depreciated, use cross table formatter instead
  • load_model() loads and applies translations
  • slicer server uses new localization methods (removed localization code from slicer)
  • workspace context provides proper list of locales and new key 'translations'
  • added base class Workspace which backends should subclass; backends should use workspace.localized_model(locale)
  • create_model() accepts list of translations

Fixes

  • browser.set_locale() now correctly changes browser's locale
  • Issue #97: Dimension values call cartesians when cutting by a different dimension
  • Issue #99: Dimension "template" does not copy hierarchies

Links

Sources can be found on github. Read the documentation.

Join the Google Group for discussion, problem solving and announcements.

Submit issues and suggestions on github

IRC channel #databrewery on irc.freenode.net

If you have any questions, comments, requests, do not hesitate to ask.

2012-12-09 by Stefan Urbanek

Cubes 0.10.1 Released - Multiple Hierarchies

Quick Summary:

  • multiple hierarchies:
  • Python: cut = PointCut("date", [2010,15], hierarchy='ywd') (docs)
  • Server: GET /aggregate?cut=date@ywd:2010,15 (see docs - look for aggregate documentation)
  • Server drilldown: GET /aggregate?drilldown=date@ywd:week
  • added result formatters (experimental! API might change)
  • added pre-aggregations (experimental!)

New Features

  • added support for multiple hierarchies
  • added dimension_schema option to star browser – use this when you have all dimensions grouped in a separate schema than fact table
  • added HierarchyError - used for example when drilling down deeper than possible within that hierarchy
  • added result formatters: simple_html_table, simple_data_table, text_table
  • added create_formatter(formatter_type, options ...)
  • AggregationResult.levels is a new dictionary containing levels that the result was drilled down to. Keys are dimension names, values are levels.
  • AggregationResult.table_rows() output has a new variable is_base to denote whether the row is base or not in regard to table_rows dimension.
  • added create_server(config_path) to simplify wsgi script

  • added aggregates: avg, stddev and variance (works only in databases that support those aggregations, such as PostgreSQL)

  • added preliminary implemenation of pre-aggregation to sql worskspace:

  • create_conformed_rollup()
  • create_conformed_rollups()
  • create_cube_aggregate()

Server:

  • multiple drilldowns can be specified in single argument: drilldown=date,product
  • there can be multiple cut arguments that will be appended into single cell
  • added requests: GET /cubes and GET /cube/NAME/dimensions

Changes

  • Important: Changed string representation of a set cut: now using semicolon ';' as a separator instead of a plus symbol '+'
  • aggregation browser subclasses should now fill result's levels variable with coalesced_drilldown() output for requested drill-down levels.
  • Moved coalesce_drilldown() from star browser to cubes.browser module to be reusable by other browsers. Method might be renamed in the future.
  • if there is only one level (default) in a dimension, it will have same label as the owning dimension
  • hierarchy definition errors now raise ModelError instead of generic exception

Fixes

  • order of joins is preserved
  • fixed ordering bug
  • fixed bug in generating conditions from range cuts
  • AggregationResult.table_rows now works when there is no point cut
  • get correct reference in table_rows – now works when simple denormalized table is used
  • raise model exception when a table is missing due to missing join
  • search in slicer updated for latest changes
  • fixed bug that prevented using cells with attributes in aliased joined tables

Links

Sources can be found on github. Read the documentation.

Join the Google Group for discussion, problem solving and announcements.

Submit issues and suggestions on github

IRC channel #databrewery on irc.freenode.net

If you have any questions, comments, requests, do not hesitate to ask.

2012-10-05 by Stefan Urbanek

Cubes 0.10 Released

After a while, here is an update to Cubes - Python Lightweight OLAP framework for multidimensional modeling. There are some changes included that were mentioned in the EruoPython talk such as table_rows and cross_table.

I recommend to look at updated examples in the Github repository. The Flask example is now "real" example instead of "sandbox" example and you can see how to generate a simple table for dimension hierarchy browsing.

There is also a more complex example with star-like schema dataset in the cubes-examples github repository. Follow the instructions in README files how to make it running.

There are some backward incompatible changes in this release – until 1.0 the "point" releases will contain this kind of changes, as it is still evolving. You can find more information below.

Quick Summary

  • Way how model is constructed has changed. Designated methods are create_model() or load_model()
  • Dimension defition can have a "template". For example:
    {
      "name": "contract_date",
      "template": "date"
    }
  • added table_rows() and cross_table() to aggregation result for more convenient table creation. The table_rows takes care of providing appropriate dimension key and label for browsed level.
  • added simple_model(cube_name, dimension_names, measures)

Incompatibilities: use create_model() instead of Model(**dict), if you were using just load_model(), you are fine.

New Features

  • To address issue #8 create_model(dict) was added as replacement for Model(**dict). Model() from now on will expect correctly constructed model objects. create_model() will be able to handle various simplifications and defaults during the construction process.
  • added info attribute to all model objects. It can be used to store custom, application or front-end specific information
  • preliminary implementation of cross_table() (interface might be changed)
  • AggregationResult.table_rows() - new method that iterates through drill-down rows and returns a tuple with key, label, path, and rest of the fields.
  • dimension in model description can specify another template dimension – all properties from the template will be inherited in the new dimension. All dimension properties specified in the new dimension completely override the template specification
  • added point_cut_for_dimension
  • added simple_model(cube_name, dimensions, measures) – creates a single-cube model with flat dimensions from a list of dimension names and measures from a list of measure names. For example:
model = simple_model("contracts", ["year","contractor", "type"], ["amount"])

Slicer Server:

  • /cell – return cell details (replaces /details)

Changes

  • creation of a model from dictionary through Model(dict) is depreciated, use create_model(dict) instead. All initialization code will be moved there. Depreciation warnings were added. Old functionality retained for the time being. (important)
  • Replaced Attribute.full_name() with Attribute.ref()
  • Removed Dimension.attribute_reference() as same can be achieved with dim(attr).ref()
  • AggregationResult.drilldown renamed to AggregationResults.cells (important)

Planned Changes:

  • str(Attribute) will return ref() instead of attribute name as it is more useful

Fixes

  • order of dimensions is now preserved in the Model

Links

Sources can be found on github. Read the documentation.

Join the Google Group for discussion, problem solving and announcements.

Submit issues and suggestions on github

IRC channel #databrewery on irc.freenode.net

If you have any questions, comments, requests, do not hesitate to ask.

Next Page