Package mondrian.test.loader
Class MondrianFoodMartLoader
- java.lang.Object
-
- mondrian.test.loader.MondrianFoodMartLoader
-
public class MondrianFoodMartLoader extends Object
Utility to load the FoodMart dataset into an arbitrary JDBC database.This is known to create test data for the following databases:
- LucidDB-0.9.2
- MySQL 3.23 using MySQL-connector/J 3.0.16
- MySQL 4.15 using MySQL-connector/J 3.0.16
- Oracle 10g using ojdbc14.jar
- Postgres 8.0 beta using postgresql-driver-jdbc3-74-214.jar
- FirebirdSQL 1.0.2 and JayBird 1.5 (JDBC)
Output can be to a set of files with create table, insert and create index statements, or directly to a JDBC connection with JDBC batches (lots faster!)
Command line examples for specific databases
MySQL
$ mysqladmin create foodmart
$ java -cp 'classes;testclasses' mondrian.test.loader.MondrianFoodMartLoader --aggregates -tables -data -indexes -jdbcDrivers=com.mysql.jdbc.Driver -inputJdbcURL=jdbc:odbc:MondrianFoodMart -outputJdbcURL=jdbc:mysql://localhost/foodmartFirebirdSQL
$ /firebird/bin/isql -u SYSDBA -p masterkey
Use CONNECT or CREATE DATABASE to specify a database
SQL> CREATE DATABASE '/mondrian/foodmart.gdb';
SQL> QUIT;
$ java -cp "/mondrian/lib/mondrian.jar:/mondrian/lib/log4j.jar: /mondrian/lib/eigenbase-xom.jar:/mondrian/lib/eigenbase-resgen.jar: /mondrian/lib/eigenbase-properties.jar:/jdbc/fb/firebirdsql-full.jar" mondrian.test.loader.MondrianFoodMartLoader -tables -data -indexes -jdbcDrivers="org.firebirdsql.jdbc.FBDriver" -inputFile="/mondrian/demo/FoodMartCreateData.sql" -outputJdbcURL="jdbc:firebirdsql:localhost/3050:/mondrian/foodmart.gdb" -inputJdbcUser=SYSDBA -inputJdbcPassword=masterkeySee
bin/loadFoodMart.sh
for examples of command lines for other databases.- Since:
- 23 December, 2004
- Author:
- jhyde
-
-
Constructor Summary
Constructors Constructor Description MondrianFoodMartLoader(String[] args)
Creates an instance of the loader and parses the command-line options.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
Command-line entry point.void
usage()
Prints help.
-
-
-
Constructor Detail
-
MondrianFoodMartLoader
public MondrianFoodMartLoader(String[] args)
Creates an instance of the loader and parses the command-line options.- Parameters:
args
- Command-line options
-
-
Method Detail
-
usage
public void usage()
Prints help.
-
main
public static void main(String[] args)
Command-line entry point.- Parameters:
args
- Command-line arguments
-
-