You are here: Reference > Rule types > Extract rules > Extract rules - Completing the File Specification tab

Extract rules – Completing the File Specification tab

  1. About 
  2. New 
  3. Definition 
  4. Filter Criteria 
  5. File Specification 
  6. Execution History 
  1. Pages & Classes 
  2. History 
  3. More... 

Complete the File Specification tab to control where extract output is written. The fields that display depend on the Output Format that you select in the Definition tab.

Use the -P command-line option to override the output directories specified on this tab, instead directing all files to a specified location.

Output Format

Fields

XML

If the Dynamic System Setting that you created to enable or disable the generation of an XSD file is set to false, the XML Schema director and XML schema File Name field are not available.

  • XML schema directory — Identify a directory to receive the XML schema file.
  • XML schema File Name — Enter a name for the XML schema file.
  • XML file output directory — Identify a directory to receive the XML output files.
  • XML output file name — Enter a name for the XML output files. The system automatically adds the.xml and .xsd extensions to the file name. You can use these wild card strings in the output file name to reference their corresponding substitution strings:
    • %i - (RunIdentifier) The unique run identifier that is written in the extract file.
      • The identifier can be passed in as a command-line parameter to the command-line extract process using the -k option.
      • If no identifier is passed in, the system generates an identifier consisting of the pzInsKey of the Extract rule followed by a unique sequence number that increments every time that the extract runs.

      • This identifier is unique across all nodes.

    • %s - The automatically generated sequence number.
    • %c - (ClassName) The Applies To class of the Extract rule.
    • %r - The name of the Extract rule.
    • %d - (ExtractRunDate) The date of the extract run.
    • %t - (ExtractRunDateTime) The date and time of the extract run.

These substitutions are also automatically applied to the BIX schema file for XML (XSD file), which is automatically generated for each run of an Extract rule using XML output for its data.

CSV

CSV Output Directory — Identify a directory to receive the CSV files.

Database

Select the name of the database (an instance of Data-Admin-DB-Name) to receive the extracted data.

Because the Pega RULES database is the source of the data, do not select PegaRULES as the target in this field.

Before extracting data to the target database, you must first create a schema to match the extracted data. You can use BIX to generate an SQL file that creates the appropriate schema. For more information, see Running a BIX extract from the command line.

This options is not available when running an Extract rule in the Pega Cloud.

After you complete this tab, save the rule form, then click Test Connectivity to verify that you have a valid path to the database or directories specified in this tab. Pega Platform reports the results of the test in a pop-up window.

Create a manifest

Select the Include manifest check box to create a manifest, or summary statement, of the records extracted. You can create the manifest in the file format of your choice, independent of the output format that you selected for the actual extract.

Depending on your choice, additional fields display:

Output Format

Fields

XML
  • Manifest XML file output directory — Identify a directory to receive the XML output files.
  • Manifest XML output file name — Enter a name for the XML output files. The system automatically adds the.xml and .xsd extensions to the file name. You can use these wild card strings in the output file name to reference their corresponding substitution strings:
    • %i - (RunIdentifier) The unique run identifier that is written in the extract file.
      • The identifier can be passed in as a command-line parameter to the command-line extract process using the -k option.
      • If no identifier is passed in, the system generates an identifier consisting of the pzInsKey of the Extract rule followed by a unique sequence number that increments every time the extract runs.
      • This identifier is unique across all nodes.
    • %s - The automatically generated sequence number.
    • %c - (ClassName) The Applies To class of the Extract rule.
    • %r - The name of the Extract rule.
    • %d - (ExtractRunDate) The date of the extract run.
    • %t - (ExtractRunDateTime) The date and time of the extract run.

These substitutions are also automatically applied to the BIX schema file for XML (XSD file) that is automatically generated for each run of an Extract rule that outputs data in XML output.

Comma Separated File (CSV)

Manifest CSV file output directory — Identify a directory to receive the CSV files.

Database Schema

Manifest output database name — Specify the name of the database where the manifest is to be written.

If you want to output the manifest to a database, you must prepare the database by adding two tables, pr_extract_summary and pr_extract_details. When you run the extract for the first time (or after editing the rule):

  1. In the form where you enter run parameters, select the Generate manifest schema DDL check box to create the schema DDL that is used to create the tables.
  2. In the next field, provide the location on your computer to create the schema.
  3. Provide the created schema to your database administrator, who can then update the database so it can receive the manifest.
  4. The manifest DDL scripts are generated with the default schema name prefixed to the table name.

Click Test Connectivity to verify that you have a valid path to the database or directory that you specified. Pega Platform reports the results of the test in a pop-up window.

In the Include check total property field, you can select an extract property to use as a "checksum" for the extract.

Contents of the manifest

The manifest that you generate includes a summary of the extract run, including:

If you save the manifest to CSV or to a database, the manifest also includes for each destination CSV file or table:

The extract writes the manifest records as a single commit at the end of the extract. If there is an error during this commit, the extract writes the manifest information to the log file.

Notes about output

About Extract rules