Running the command-line extraction process

Once you have configured your environment, you can run the command-line extract process.

From the command line or in a script, make a Java call to com.pega.pegarules.data.internal.access.ExtractImpl, supplying arguments to specify:

  • JVM memory options – Ensure that your JVM is allocated with enough memory for the operation by setting:
    • The initial Java heap size to 512m (-Xms512m)
    • The maximum heap size to at least 768m (-Xmx768m)
  • System properties - Provide the location of the Pega Platform configuration files prconfig.xml, prlog4j2.xml, prbootstrap.properties, and if used, pegarules.keyring. For example:
    • -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

    • -Dpegarules.keyring=config/pegarules.keyring
  • An Extract rule definition - Provide either:
    • The -i switch and the name ( pxInsName ) of the Extract rule in the source Pega Platform database.
    • The -I switch and the path and filename of the XML file that contains the XML representation of the Extract rule.
  • Optional parameters - Specify ranges of the data to be extracted and other processing configuration. For example, you can:
    • Filter the data by key or date range
    • Specify the number of statements to issue before committing to the target database, or number of records to process before a batch commit,
    • Provide a Pega Platform username and password to allow rule resolution of the Extract rule in the Pega Platform database.
Note: To use the last option listed under "Optional parameters," call the main program com.pega.pegarules.pub.PegaRULES, and provide the username and password to ExtractImpl as the first argument. The resulting statement might look like this:

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

com.pega.pegarules.pub.PegaRULES com.pega.pegarules.data.internal.access.ExtractImpl -a $USERNAME$ -p $PASSWD$ -i

PegaSample!SampleBIX_CSV

You can add a unique identifier for the current extract process.

See Setting optional command-line BIX parameters for details on all available parameters.

The engine Java classes invoked by BIX 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. The PegaRULES class is part of the prbootstrap.jar library.

Example extract on a Db2 system

To run the extract “PegaSample!SampleBIX” on a Db2 system:

java –Xms512m –Xmx768m –classpath".;lib\prbootstrap-api.jar;lib\prbootstrap.jar;lib\prdbcp.jar;lib\db2jcc_v95.jar;lib\jsr94-1.0.jar;%CLASSPATH%" -Dcom.pega.pegarules.bootstrap.properties.url=config\prbootstrap.properties -Dpegarules.config=config\prconfig.xml -Dpegarules.logging.configuration=config\prlog4j2.xml -Dcom.pega.pegarules.bootstrap.ignorejndi=true com.pega.pegarules.pub.PegaRULES com.pega.pegarules.data.internal.access.ExtractImpl -i PegaSample!SampleBIX

In this instance, you provide the appropriate path and JDBC driver name.

Note: For Pega Cloud applications, BIX is an add-on service that Pega configures if you choose it as part of your subscription. For on-premises applications, BIX is available when you purchase and install the BIX application.