I'm trying to learn how to build a BI stack, but I'm stuck at understanding what part of the process failed :
- Designing a star schema : done
- Loading data from my OLTP database (MySQL) to my star database (MySQL too) : done with Pentaho Data Integration
- Making a Mondrian XML description the cube : done with Mondrian Schema Workbench
- Setuping a Saiku server with the correct configuration using the Mondrian XML description and the MySQL star database : done
Result : no cube appears in Saiku. I don't know from which element this might come from. Step 2 is correct, since I can run this part.
Here's my star schema :
CREATE TABLE IF NOT EXISTS `dim_date` (
`date_id` int(11) NOT NULL AUTO_INCREMENT,
`date` datetime DEFAULT NULL,
`month` varchar(3) DEFAULT NULL,
`year` varchar(4) DEFAULT NULL,
PRIMARY KEY (`date_id`),
KEY `idx_dim_date_lookup` (`date`,`month`,`year`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `dim_sector` (
`sector_id` int(11) NOT NULL AUTO_INCREMENT,
`sector` varchar(255) DEFAULT NULL,
PRIMARY KEY (`sector_id`),
KEY `idx_dim_sector_lookup` (`sector`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `dim_size` (
`size_id` int(11) NOT NULL AUTO_INCREMENT,
`size` varchar(10) DEFAULT NULL,
PRIMARY KEY (`size_id`),
KEY `idx_dim_size_lookup` (`size`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `fact_companies` (
`fact_id` int(11) NOT NULL AUTO_INCREMENT,
`count` int(11) NOT NULL,
`date_id` int(11) NOT NULL,
`sector_id` int(11) NOT NULL,
`size_id` int(11) NOT NULL,
PRIMARY KEY (`fact_id`),
KEY `date_id` (`date_id`),
KEY `sector_id` (`sector_id`),
KEY `size_id` (`size_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE `fact_companies`
ADD CONSTRAINT `fact_companies_ibfk_1` FOREIGN KEY (`date_id`) REFERENCES `dim_date` (`date_id`),
ADD CONSTRAINT `fact_companies_ibfk_2` FOREIGN KEY (`sector_id`) REFERENCES `dim_sector` (`sector_id`),
ADD CONSTRAINT `fact_companies_ibfk_3` FOREIGN KEY (`size_id`) REFERENCES `dim_size` (`size_id`);
My Mondrian XML is (size is missing) :
<Schema name="New Schema1">
<Cube name="companies_cube" visible="true" cache="true" enabled="true">
<Table name="fact_companies">
</Table>
<Dimension type="TimeDimension" visible="true" foreignKey="date_id" name="date">
<Hierarchy name="All" visible="true" hasAll="true" allMemberName="all" allMemberCaption="all" allLevelName="all">
<Level name="Date" visible="true" table="dim_date" column="date" nameColumn="date" uniqueMembers="false">
</Level>
<Level name="Month" visible="true" table="dim_date" column="month" nameColumn="month" uniqueMembers="false">
</Level>
<Level name="Year" visible="true" table="dim_date" column="year" nameColumn="year" uniqueMembers="false">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" visible="true" foreignKey="sector_id" name="Sector">
<Hierarchy name="Sector" visible="true" hasAll="true" primaryKey="sector_id" primaryKeyTable="sector_id">
<Level name="Sector" visible="true" table="dim_sector" column="sector_id" nameColumn="sector" uniqueMembers="false">
</Level>
</Hierarchy>
</Dimension>
<Measure name="count companies" column="count" aggregator="sum" visible="true">
</Measure>
</Cube>
</Schema>
My connection with Saiku server is done through :
type=OLAP
name=test
driver=mondrian.olap4j.MondrianOlap4jDriver
location=jdbc:mondrian:Jdbc=jdbc:mysql://192.168.1.43/testdb;Catalog=res:test/testdb.xml;JdbcDrivers=com.mysql.jdbc.Driver;
username=test
password=test
I wrote this one considering the foodmart sample provided and the documentation of saiku.
Where should I look ? What can I do to see what is not working ? What is the professional way of developing a BI infrastructure ?