Pega Platform offers a powerful tool called Extract Rules, powered by the Business Intelligence Exchange (BIX) facility. This blog post will guide you through what Extract Rules are, how to enable them, and the process of creating and running them to extract valuable data from your Pega applications.
What are Extract Rules?
Extract Rules define the specific data you want to extract from your application. They belong to the SysAdmin category and leverage the Pega-BIX ruleset (which needs to be enabled). These rules allow you to extract various types of data, including:
Properties from individual classes in your application.
Value Lists and Value Groups associated with those properties.
Multi-level structures like embedded Pages, Page Lists, and Page Groups.
Inherited properties from parent classes.
You can even filter the data extraction based on specific conditions you set.
Extracted Data: Where Does it Go?
The extracted data can be exported in various formats to suit your needs:
XML Files: This format is ideal for hierarchical data structures with embedded XML tags.
Comma-Separated Values (CSV) Files: This option creates separate text files with comma-separated values, making it easy to import into spreadsheets.
Database Tables: Extract data directly into existing relational databases outside your Pega application. The extraction process creates separate tables for top-level pages, page lists, page groups, and individual property values.
Enabling the BIX Ruleset
Before creating Extract Rules, you need to activate the BIX functionality. Here's a quick walkthrough:
Navigate to Records > Application Definition > Application.
Select your application rule.
In the "Application rulesets" section, click "+ Add Ruleset".
Enter "Pega-BIX: xx-xx-xx" (replace "xx" with your Pega Platform version).
Click Save and then log out and log back in for the changes to take effect.
Creating and Running an Extract Rule
Once BIX is enabled, follow these steps to create and run an Extract Rule:
Go to Create > SysAdmin > Extract in the Dev Studio header.
Give your Extract Rule a descriptive name in the "Label" field.
In the "Context" field, choose the application, class, and ruleset from which you want to extract data.
Click Create and open.
On the "Definition" tab, select the desired output format (XML, CSV, or Database Schema) and choose the properties you want to extract.
For specific property selection:
XML and CSV: Click the properties icon at the class level and choose the page lists, page groups, and single values you want. Nested pages and properties can be further specified by clicking the arrow icon.
Database Schema: Identify the external database instance in the "File Specification" tab.
(Optional) Define filter criteria on the "Filter Criteria" tab to narrow down the extracted data.
In the "File Specification" tab, provide details for the chosen output format (directory location, etc.).
The "Execution History" tab displays a record of past and ongoing BIX extractions.
To run the extraction manually, click Actions > Run in the rule form toolbar. (For production use, running via a Job Scheduler is recommended.)
Enter a unique identifier for this specific extraction run. This identifier will be included in the extracted files for reference.
Finally, click Perform Extract for XML and CSV formats.
Conclusion
Extract Rules empower you to unlock valuable data from your Pega applications. By leveraging the BIX functionality and following the steps outlined above, you can gain valuable insights and make informed decisions based on your application's data.
-Team Enigma Metaverse
Comentarios