Running a BIX command-line extraction using ANT build files
The Apache Another Neat Tool (ANT) build file acts as a script to run the Business
Intelligence Exchange (BIX) command-line extraction process. Call the ANT build file to achieve
the same Java functionality of a command-line extraction process without entering the entirety
of the extraction Java method in the command line. The BIX ANT file,
bix.xml
, uses the same Java methods as the task Running the BIX command-line extraction
process.
- In your Pega Platform distribution directory, open the
bix.xml
file with your text and source-code editor.The following XML code is displayed:
<?xml version="1.0" encoding="UTF-8"?> <project name = "Sample" default = "Bix" > <target name="Bix"> <property name="ARGLINE" value="PegaSample!Sample"/> <echo message="Performing Export"/> <condition property="javaVersion" value="6"> <matches string="${java.version}" pattern="1.6.*" /> </condition> <echo message="using java version ${javaVersion}"/> <java classname="com.pega.pegarules.pub.PegaRULES" failonerror="true" fork="true"> <classpath> <fileset dir="lib/"> <include name="*.jar"/> </fileset> <pathelement path="."/> <pathelement path="${java.class.path}"/> </classpath> <jvmarg value="-Xms128m"/> <jvmarg value="-Xmx512m"/> <sysproperty key="com.pega.pegarules.bootstrap.properties.url" value="config/prbootstrap.properties" /> <jvmarg value="-Dpegarules.config=config/prconfig.xml"/> <jvmarg value="-Dpega.prbootstrap.config=config/prbootstrap.properties"/> <jvmarg value="-Dcom.pega.pegarules.bootstrap.ignorejndi=true"/> <jvmarg value="-Dpegarules.logging.configuration=config/prlog4j2.xml"/> <jvmarg value="-Dpega.tmpdir=."/> <arg value="com.pega.pegarules.data.internal.access.ExtractImpl" /> <arg line="-i"/> <arg value="${ARGLINE}" /> <!--<arg line="-a"/> <arg value="[email protected]"/> <arg line="-p"/> <arg value="install"/> --> </java> </target> </project>
- Find and edit the following elements in the
bix.xml
file. Include quotes in the values.ANT build file elements to edit
Element Value <property name="ARGLINE" value=" "
Set to the label of the Extract rule that you want to execute. <fileset dir="lib/">
Enter the name of the library directory. The default name is lib
.<include name="*.jar"/>
Specify the JAR files that are used in the source database. <pathelement path="."/>
Enter the location of the library directory. <pathelement path="$ "/>
Set the Java class path. <jvmarg value=>
Specify your JVM memory: - Set the initial Java heap size to 512m (-Xms512m).
- Set the maximum heap size to at least 768m (-Xmx768m)
<jvmarg value="-Dpegarules.config=config/prconfig.xml"/>
Add the directory for the BIX prconfig.xml
file.<jvmarg value="-Dpegarules.logging.configuration=config/prlog4j2.xml"/>
Add the directory for the BIX prlog4j2.xml
file.<jvmarg value="-Dpega.prbootstrap.config=config/prbootstrap.properties"/>
Add the directory for the BIX prbootstrap.properties file. - Save and close the
bix.xml
file. - Open a command prompt and run the build with the following
command:
ant -f bix.xml
After using an ANT build file to run the BIX command-line extraction process, your XML and CSV extract files are saved in the local directory that you specified during the Extract rule creation. For database schema extractions, see your external database instance to view the extraction table data.
Previous topic Generating a DDL file for command-line Database Schema extractions Next topic BIX parameters and command-line arguments