日期:2014-05-16  浏览次数:20683 次

安装Mondrian
Mondrian and OLAP

Mondrian is an OLAP engine written in Java. It executes queries written in the MDX language, reading data from a relational database (RDBMS), and presents the results in a multidimensional format via a Java API

?

官网地址:http://mondrian.pentaho.com/documentation/installation.php#MySQL_on_Linux_example

?

?

  • 从http://sourceforge.net/projects/mondrian下载Mondian包;
  • 解压mondrian-3.5.0.zip文件,我们需要把解压后生成的mondrian.war文件解压后并把其中的*.jar文件都拷贝到mondrian\lib中,因为在后面导入数据时用到的jar文件都在mondrian.war中
  • 创建mysql用户并赋权限
    mysqladmin -u root -p create foodmart
    grant all privileges on *.* to ‘foodmart’@'localhost’ identified by ‘foodmart’;
  • 导入数据到MySQL中
    java -cp “D:\Projects\mondrian\mondrian\lib\mondrian.jar;D:\Projects\mondrian\mondrian\lib\olap4j.jar;D:\Projects\mondrian\mondrian\lib\retroweaver-rt.jar;D:\Projects\mondrian\mondrian\lib\log4j-1.2.8.jar;D:\Projects\mondrian\mondrian\lib\commons-logging-1.0.4.jar;D:\Projects\mondrian\mondrian\lib\eigenbase-xom.jar;D:\Projects\mondrian\mondrian\lib\eigenbase-resgen.jar;D:\Projects\mondrian\mondrian\lib\eigenbase-properties.jar;D:\Projects\mondrian\mondrian\lib\mysql-connector-java-5.1.18-bin.jar” mondrian.test.loader.MondrianFoodMartLoader -verbose -tables -data -indexes -jdbcDrivers=”com.mysql.jdbc.Driver”?-inputFile=”D:\Projects\mondrian\mondrian\demo\foodmart.sql”?-outputJdbcURL=”jdbc:mysql://localhost:3306/foodmart” -outputJdbcUser=foodmart -outputJdbcPassword=foodmart

由于最新版本的Mondian包中没有foodmart.sql,可以打开https://github.com/pentaho/mondrian/,

点击 ?/demo/FoodMartCreateData.zip

下载。