mondrian.test.loader
Class MondrianFoodMartLoader

java.lang.Object
  extended by 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:

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/foodmart

FirebirdSQL

$ /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=masterkey

See bin/loadFoodMart.sh for examples of command lines for other databases.

Since:
23 December, 2004
Author:
jhyde

Constructor Summary
MondrianFoodMartLoader(String[] args)
          Creates an instance of the loader and parses the command-line options.
 
Method Summary
static void main(String[] args)
          Command-line entry point.
 void usage()
          Prints help.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads