Skip to content
Boris Glavic edited this page Aug 10, 2017 · 2 revisions

Commandline Programs and Options

iBench comes with three types of commandline programs. All are included in the generated "fat" jar file and can be run using the convenience scripts provided by iBench.

  • iBench.sh - runs iBench to generate metadata and data
  • loader.sh - loads schema and data generated by iBench
  • configGen.sh - automatically generate iBench configuration files

iBench.sh

This is the main iBench binary. At a minimum the user provides a path to an iBench configuration file using the -c option. For instance,

cd build
./iBench.sh -c ../exampleConfigurations/tutorialOneCopy.txt 

The following options control the log4j framework used by iBench logging.

 -logconfig FILE         : path to log4j configuration file to use
 -loglevel               : set a global log level if no log4j configuration

Most options that control what iBench does are given in the configuration file. For convenience some options can be overridden by using commandline options (use -help to print this help message):

 -c VAL                  : Read configuration from this file
 -enableTargetData       : enable target schema data generation (default: false)
 -exchangeTargetData     : enable target schema data exchangeing (default:
                           false)
 -help                   : show this help message (default: true)
 -instancePrefix VAL     : instance path prefix (default: .)
 -logconfig FILE         : path to log4j configuration file to use
 -loglevel               : set a global log level if no log4j configuration
                           file is specificed
 -mappingFile VAL        : name for file to store the mappings (default: M.html)
 -maxNumericValue N      : maximal numeric value generated by data generator
                           (overrides corresponding configuration file setting)
                           (default: 0)
 -maxStringLength N      : maximal length of strings generated by data
                           generator (overrides corresponding configuration
                           file setting) (default: 0)
 -p VAL                  : Read configuration from this property file
 -repElemCount N         : the number of tuples created for each relation in a
                           generated schema (overrides corresponding
                           configuration file setting) (default: 0)
 -schemaFile VAL         : name for Vagabond mapping scenarion XML file to
                           generate (default: Schemas.xml)
 -schemaPrefix VAL       : schema path prefix (default: .)
 -sourceDocumentName VAL : name for the source document (default: I.xml)
 -sourceInstanceFile VAL : name for the source instance file (default:
                           ToXgene.template)
 -sourceSchemaFile VAL   : name for the source schema file (default: S)
 -targetSchemaFile VAL   : name for the target schema file (default: T)
 -targetTableNumRows N   : number of rows for the target table (default: 0)

loader.sh

This script is used to load a schema and data generated by iBench into a supported database (currently PostgreSQL and Perm). The loader will create tables for each relation in the source schema and create a view for each target schema relation using the transformations (SQL queries) created by iBench. If the user has chosen to generate independent target data then additional tables will be created to store that data. For instance,

./loader.sh -f myScen.xml

loads the schema and data that was generated by the iBench and stored in a mapping scenario metadata xml file myScen.xml.

 --no-data                   : don't create instance data (default: false)
 --no-target                 : don't create target schema and instance
                               (default: false)
 --no-validation             : deactivate validations of Tramp XML mapping file
                               (default: false)
 --output [none | xml | map] : output mapping in format (xml = Tramp XML
                               mapping file, map = .map file) (default: none)
 --validate-only             : only validate mapping XML file (default: false)
 -P N                        : port for database connection (default: 5432)
 -c FILE                     : data files (CSV) are load from this directory
 -d VAL                      : name of the database to connect to (default:
                               tramptest)
 -f FILE                     : xml mapping scenario document
 -h VAL                      : URL of the database to connect to (default:
                               localhost)
 -logconfig FILE             : path to log4j configuration file to use
 -loglevel                   : set a global log level if no log4j configuration
                               file is specificed
 -p VAL                      : password for database user (default: )
 -u VAL                      : user name for connecting to the database
                               (default: postgres)

configGen.sh

This script generates iBench configuration files. This is used to partially automate experiments which need many different mapping scenarios

 -c FILE : A configuration file template with substitution parameters
 -f      : set to true to use a fixed configuration file (default: false)
 -i N    : the number of times iBench is run with each config file (default: 1)
 -log    : log to console too (default: false)
 -noout  : do not write the generated XML mapping scenarios to disk (default:
           false)
 -p FILE : all configurations, logs, and results will be output into this
           folder (default: test)

Clone this wiki locally