The custom store has to be a subclass of Store so Cubes can find it. The
name will be derived from the class name: MyStore will become my,
AnotherSQLStore will become another_sql. To explicitly specify a store
name, set the __extension_name__ class variable.

The store is configured from a slicer.ini file. The store instance receives
all options from it’s configuration file section as arguments to the
__init__() method.

It is highly recommended that the store provides a class variable named
__options__ which is a list of parameter description dictionaries. The list
is used for properly configuring the store from end-user tools, such as
Slicer. It also provides information about how to convert options into
appropriate data types. Example:

Name of the example store will be snowflake. To explicitly set the browser
name set the __extension_name__ class property:

classSnowflakeBrowser(AggregationBrowser):__extension_name__="sql"

In this case, the browser will be known by the name sql.

Note

The current AggregationBrowser API towards the extension development is
provisional and will verylikely change. The change will mostly involve
removal of requirements for preparation of arguments and return value.

split (optional browser feature) – virtual cell-based dimension to split
the aggregation cell into two: within the split cell or outside of the split
cell. Can be either None or a cubes.Cell instance

page, page_size – page number and size of the page for paginated results

order – order specification: list of two-item tuples (attribute,
order)

defprovide_aggregate(self,cell,aggregates,drilldown,split,order,page,page_size,**options):## ... do the aggregation here ...#result=AggregationResult(cell=cell,aggregates=aggregates)# Set the result cells iterator (required)result.cells=...result.labels=...# Optional:result.total_cell_count=...result.summary=...returnresult

The browser features for all or a particuliar cube (if there are differences)
are returned by the cubes.AggregationBrowser.features() method. The
method is expected to return at least one key in the dictionary: actions
with list of browser actions that the browser supports.

Browser actions are: aggregate, fact, facts, members and
cell.

Optional but recommended is setting the list of aggregate_functions –
functions for measures computed in the browser’s engine. The other is
post_aggregate_functions – list of fucntions used as post-aggregation
outside of the browser.