Monday, September 14, 2009

How to load FoodMart Database into Postgresql

You have to read the installation manual first (http://mondrian.pentaho.org/documentation/installation.php#PostgreSQL_on_Windows_example) then you need a little change to load FoodMart into Postgres

The easy way to import FoodMart data use the pentaho

1. Create Database
server# createdb -U -Eutf8 foodmart
2. Locate biserver-ce folder.
3. Go to library folder.
server# cd biserver-ce/tomcat/webapps/pentaho/WEB-INF/
3. Then locate the Data FoodMartCreateData.sql. (in my case is /mondrian/demo/FoodMartCreateData.sql)


server:biserver-ce/tomcat/webapps/pentaho/WEB-INF/$ java -cp \
"mondrian-3.1.1.jar:lib/log4j-1.2.8.jar:lib/eigenbase-resgen-1.3.0.11873.jar:lib/eigenbase-properties-1.1.0.10924.jar:lib/eigenbase-xom-1.3.0.11999.jar:lib/commons-logging-1.1.jar:lib/postgresql-8.2-504.jdbc3.jar" \
mondrian.test.loader.MondrianFoodMartLoader \
-verbose -tables -data -indexes \
-jdbcDrivers="org.postgresql.Driver,sun.jdbc.odbc.JdbcOdbcDriver" \
-inputFile=/mondrian/demo/FoodMartCreateData.sql \
-outputJdbcURL="jdbc:postgresql://localhost/foodmart" \
-outputJdbcUser=postgres \
-outputJdbcPassword=password


You need to locate your classes for run this.
Good Luck!
Ask me if you need this postgres dump file!

No comments: