MDX Documentation

Cube Data Sources

OLAP cubes (i.e., dimensions and measures) are built from raw data that comes from different physical sources called data sources (e.g. files, DB, Excel sheets, etc.).

The business logic of these data sources is first to access the raw data and second to adapt them as a set of tabular data structures (i.e. tables made of columns) for later processing performed while creating the cubes.

Built on top of that data source abstraction, schema and cube factories are responsible for actually creating dimensions (also using some sort of additional meta-information) and facts. More on this in the next chapter.

As for the functions plugin described in the previous chapter, each new builder class is injected using XML elements in a regular plugin.xml file.

Example

For example, here is the Excel data source plugin description file as shipped with icCube. It adds three new classes that allow you to define a cube right from Excel sheets and more specifically, a new data source and data table classes.

<plugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://www.crazy-development.com/schemas/icCubePlugins.xsd">

    <name>Excel Cube Factory</name>

    <builder className="crazydev.iccube.builder.excel.datasource.OlapBuilderExcelDataSource"/>
    <builder className="crazydev.iccube.builder.excel.datasource.OlapBuilderExcelDataTable"/>
    <builder className="crazydev.iccube.builder.excel.factory.cube.OlapBuilderExcelHeaderCubeDefFactory"/>

</plugins>
    

As a quick description, the class OlapBuilderExcelDataSource is responsible to create connections to access underlying raw data (Excel sheets) and then expose this data as a set of tabular data structures (a.k.a. tables). The class OlapBuilderExcelDataTable is actually implementing this adaptation logic.

For a complete description of each class, the source code of this plugin is available within the corresponding ZIP file within the plugins directory of your installation.

Next chapter: Cube Factories shows how to tadd new cube factories for building OLAP cubes.