Running a BIX command-line extraction

After you configure your source database environment, you can run the Business Intelligence Exchange (BIX) command-line extraction process.

Before you begin: Complete the following tasks:
  1. In the command line, begin a Java call by specify your initial and maximum JVM memory with the Xms and Xmx parameters.
    1. Set the initial Java heap size to 512m (-Xms512m).
    2. Set the maximum heap size to at least 768m (-Xmx768m).
    For example: 
    java -Xms512m –Xmx768m
  2. Reference the file path for the BIX prconfig.xml, prbootstrap.properties, and (if used) prlog4j2.xml files by using the following parameters:
    1. For the prconfig.xml file, enter -Dpegarules.config=<prconfig_filepath>.
    2. For the prbootstrap.properties file, enter -Dcom.pega.pegarules.bootstrap.properties.url=<bootstrap.properties_filepath>.
    3. Optional: For the prlog4j2.xml file, enter -Dpegarules.logging.configuration=<prlog4j2_filepath>.
    For example: 
     -Dpegarules.config=./config/prconfig.xml -Dpegarules.logging.configuration=config/prlog4j2.xml -Dcom.pega.pegarules.bootstrap.properties.url=config/prbootstrap.properties 
  3. If you enabled password encryption, add the file path for the pegarules.keyring file.
  4. Disable Java Naming and Directory Interface (JNDI) databases to extract from the configured source Java Database Connectivity JDBC URL database by using the following parameter:
    -Dcom.pega.pegarules.bootstrap.ignorejndi=true
  5. Specify the location of .JAR files that are used in the BIX source database library (lib) directory by setting the classpath with the parameter -classpath.
    Include quotes (" ") around the classpath value.
    For example: 
    -classpath ".;lib\prbootstrap.jar;lib\prdbcp.jar;lib\db2jcc_v95.jar;lib\jsr94-1.0.jar;$CLASSPATH$"
  6. Optional: To use a username and password with the -a and -p parameters for the extract files acccording to your source database configuration, call com.pega.pegarules.pub.PegaRULES
    Note: If you enabled password encryption for BIX command-line extractions, you do not need to call PegaRules with the username and password elements. For details, see Enabling password encryption for BIX command-line extractions.
    For example: 
    com.pega.pegarules.pub.PegaRULES com.pega.pegarules.data.internal.access.ExtractImpl -a $USERNAME$ -p $PASSWD$
  7. Call the Extract Java class com.pega.pegarules.data.internal.access.ExtractImpl and specify an Extract rule label with the -i parameter.
    For example: 
    com.pega.pegarules.pub.PegaRULES com.pega.pegarules.data.internal.access.ExtractImpl -a $USERNAME$ -p $PASSWD$ -i SampleBIX_CSV
  8. Optional: To customize your configuration, include additional command-line extraction parameters.
    For more information, see BIX parameters and command-line arguments.
    For example: You can add the following functionality with additional BIX parameters:
    • Filter the data by date range.
    • Specify the number of records to process before a batch commit.
    • Include child classes in the extract files.
  9. Optional: To use an external XML file for the extraction process, perform the following actions:
    Note: This step requires running an instance of Pega Platform
    1. In the navigation pane of Dev Studio, click Records > SysAdmin > Extract, and then select the Extract rule to run.
    2. On the rule form, click Actions > View XML.
    3. Copy the resulting page and save the content as an XML file.
    4. Begin the command-line extraction method as in step 1.
    5. When you call com.pega.pegarules.data.internal.access.ExtractImpl to specify an Extract rule label, provide the file path in which you created the XML file and the XML file name with the parameter and arguments -I <filepath> <DDL filename>.
    For example: 
    com.pega.pegarules.pub.PegaRULES com.pega.pegarules.data.internal.access.ExtractImpl -I ./XMLpath External_XML
  10. Perform the command-line extraction by running the Java method.
    Note: For Database Schema extractions, ensure that your DBA formats the target database by using the DDL file. For more information, see Generating a DDL file for command-line Database Schema extractions.
    For example: A complete command-line extraction method:
     java –Xmx768m java -Dpegarules.config=./config/prconfig.xml -Dpegarules.logging.configuration=config/prlog4j2.xml -Dcom.pega.pegarules.bootstrap.properties.url=config/prbootstrap.properties -Dcom.pega.pegarules.bootstrap.ignorejndi=true -classpath ".;lib\prbootstrap.jar;lib\prdbcp.jar;lib\db2jcc_v95.jar;lib\jsr94-1.0.jar;$CLASSPATH$" com.pega.pegarules.pub.PegaRULES com.pega.pegarules.data.internal.access.ExtractImpl -a $USERNAME$ -p $PASSWD$ -i SampleBIX_CSV
Result: After the BIX command-line extraction process, your XML and CSV BIX 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.