XML Schema Definition: Mixed (File + Excel)
There's no limitation to the actual number of data sources that can be used when creating a cube. Indeed, a cube may be built using a combination of different types of data sources.
This chapter refers to the example cube 'Sales' within the schema 'Sales (Mixed - XML Definition)' where both Excel sheets and one file (as described previously in this document) are used to create a cube.
The XML definition contains the logic for selecting the different data sources and within each data source which data tables (or more generally, tabular structures) and columns to use for each dimension.
The following extract from the schema definition shows the reference to those two different data sources. Each data source defines, as usual, a set of data tables for later reference from the dimensions and facts definitions:
<cube name="Sales">
<excelDS name="data/sales.xls"> ... </excelDS>
<fileDS name="data.file" directory="data"> ... </fileDS>
</cube>
The Excel sheet's data source is used for everything except the 'Product' dimension definition which is sourced from the file. This is done by simply referencing the correct data table from each dimension definition:
<dimension dataTableId="data/sales.xls.Geography" name="Geography" id="Excel Sales Cube.Geography">
<dimension dataTableId="data/sales.xls.Time" name="Time" id="Excel Sales Cube.Time">
<dimension dataTableId="data.file.Product.txt" name="Product" id="Excel Sales Cube.Product">
Besides this, the contents of the referenced Excel sheets and files are identical to the ones described in the cube factory chapter. The same header definition is used.
Once properly defined, this XML definition must be placed within the icCube schema/cube directory, as explained in the cube factory chapter. This file follows the same naming convention: i.e., it must have the extension .icc-schema (case sensitive):
Next chapter: Schema XML Definition: Database describes how to create a cube using a database as data source.