日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

mondrian mysql 实例,windows7环境下将Mondrian例子数据库导入到mysql中

發布時間:2024/3/26 60 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mondrian mysql 实例,windows7环境下将Mondrian例子数据库导入到mysql中 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.獲取需要的jar包下載mondrian-3.4.1.zip

解壓至C:\mondrian

拷貝C:\mondrian\lib下的mondrian.war到tomcat下的webapps下

重啟tomcat.自動加載webapps - mondrian.war

拷貝tomcat\webapps\mondrian\WEB-INF\lib下所有jar包到C:\mondrian\lib

【還需要將mysql\Connector J 5.*.*\下的mysql-connector-java-5.*.*-bin.jar拷貝到C:\mondrian\lib】

2.準備數據庫

安裝好mysql數據庫

創建database foodmart

#create database foodmart;

#grant all privileges on *.* to 'foodmart'@'localhost' identified by 'foodmart';

3.使用mondrian自帶的工具導數據到數據庫中

java -cp C:\mondrian\lib\mondrian.jar;C:\mondrian\lib\log4j-1.2.8.jar;C:\mondrian\lib\commons-logging-1.0.4.jar;C:\mondrian\lib\eigenbase-xom.jar;C:\mondrian\lib\eigenbase-resgen.jar;C:\mondrian\lib\eigenbase-properties.jar;C:\mondrian\lib\mysql-connector-java-5.1.20-bin.jar;C:\mondrian\lib\olap4j.jar mondrian.test.loader.MondrianFoodMartLoader -verbose -tables -data -indexes -jdbcDrivers="com.mysql.jdbc.Driver" -inputFile=C:\mondrian\demo\FoodMartCreateData.sql -outputJdbcURL="jdbc:mysql://localhost/foodmart?user=foodmart&password=foodmart"

其中如果jar包的版本不一樣,直接把jar包的版本去掉即可。

運行幾分鐘,就創建好了。

如:Finished load at: Mon Nov 26 13:46:47 CST 2012就表示導完了。

4.檢查 mysql> show databases; mysql> use foodmart Database changed mysql> show tables; +-------------------------------+ | Tables_in_foodmart??????????? | +-------------------------------+ | account?????????????????????? | | agg_c_10_sales_fact_1997????? | | agg_c_14_sales_fact_1997????? | | agg_c_special_sales_fact_1997 | | agg_g_ms_pcat_sales_fact_1997 | | agg_l_03_sales_fact_1997????? | | agg_l_04_sales_fact_1997????? | | agg_l_05_sales_fact_1997????? | | agg_lc_06_sales_fact_1997???? | | agg_lc_100_sales_fact_1997??? | | agg_ll_01_sales_fact_1997???? | | agg_pl_01_sales_fact_1997???? | | category????????????????????? | | currency????????????????????? | | customer????????????????????? | | days????????????????????????? | | department??????????????????? | | employee????????????????????? | | employee_closure????????????? | | expense_fact????????????????? | | inventory_fact_1997?????????? | | inventory_fact_1998?????????? | | position????????????????????? | | product?????????????????????? | | product_class???????????????? | | promotion???????????????????? | | region??????????????????????? | | reserve_employee????????????? | | salary??????????????????????? | | sales_fact_1997?????????????? | | sales_fact_1998?????????????? | | sales_fact_dec_1998?????????? | | store???????????????????????? | | store_ragged????????????????? | | time_by_day?????????????????? | | warehouse???????????????????? | | warehouse_class?????????????? | +-------------------------------+ 37 rows in set (0.00 sec) 說明一切OK了。 接下來就可以直接使用CUBE文件FoodMart.xml了。

總結

以上是生活随笔為你收集整理的mondrian mysql 实例,windows7环境下将Mondrian例子数据库导入到mysql中的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。