How to use a stand-alone command-line BIX extract process
|
|
For general information on how BIX (Business Intelligence Exchange) works, see Extracting data with BIX.
In certain circumstances, you may want to establish BIX as a stand-alone command-line process, rather than importing it into a PRPC system. For instance, you may want to avoid disrupting a production instance of PRPC, or you may want to use the same instance of BIX to extract data from multiple PRPC instances.
To establish a stand-alone command-line BIX extract process:
- Download the BIX distribution archive to your system and expand the archive into a directory.
The config directory in this distribution contains the configuration files you set up to support the extraction process, and the lib directory contains the PRPC library files you run against. The distribution also contains a sample Ant build file to run extract process.
- Configure a JVM environment with access to PRPC JAR files and the appropriate database driver files. You must have a JRE distribution in place in the command-line system that allows you to make Java calls. Use JVM version 1.6, 1.5 or 1.4.
Make sure your classpath:
- Contains the JAR files in the lib directory of your BIX distribution on the command-line system. This directory contains the PRPC libraries.
- Includes the location of the JDBC driver JAR files for your database. For more information on the appropriate driver for your database, see “Configuring database support on your application server” in the Installation Guide. Pegasystems provides a Platform Support Guide with additional information.
- Configure prconfig.xml, prbootstrap.properties, and prlogging.xml (as described in Extracting data with BIX) to complete the command-line environment.
A sample shell script file
The following is a sample ksh script calling the ExtractImpl class with an XML representation of the Extract rule. This sample assumes the script is being run from the BIX distribution directory and that the CLASSPATH environment variable has been set correctly to include the JAR files in the BIX distribution's lib directory.
- JVM arguments to set the JVM memory parameters.
- JVM arguments to set system properties specifying the location of prconfig.xml and prlogging.xml
- ExtractImpl parameters: -I switch with the name of the .xml file containing the XML representation or the Extract rule.
From version 6.1 onwards, the engine classes are stored in the database and not in the file system. The ExtractImpl class cannot be directly run using the Java interpreter. Instead, run the PegaRULES class and pass the ExtractImpl class as an argument, as described earlier.
Sample Ant build files
The following sample Ant build files execute a call to the ExtractImpl class referencing an Extract rule in the PRPC database. The BIX distribution also contains a sample BAT script that calls a similar file.
See the readme.txt file in the BIX distribution directory for details on all the files included there.
- Set the ARGLINE Ant property to the pzInsName of the Extract rule you wish to execute.
- Java call of the ExtractImpl class.
- JVM arguments to set the JVM memory parameters.
- JVM arguments to set system properties specifying the location of prconfig.xml and prlogging.xml.
- Set the classpath to include the JAR files in the BIX distribution's "lib" directory.
- ExtractImpl parameters: -i switch with the pzInsName of the Extract rule as set in the ARGLINE property.
How to create an XML representation of an Extract rule
To create an XML version of an extract rule:
- From the Records Explorer, select SysAdmin > Extract and select the extract rule to run.
- On the rule form, Click the Rule Data icon . An XML version of the extract rule displays.
- Save it as an .xml file.