Export the Data Model From the Command Line
The Oracle Policy Modeling export command-line tool provides a means of exporting data model information from a Policy Modeling project using the command line. The tool works with any local Oracle Policy Modeling project and generates CSV files with attribute, entity and relationship details. Optional attribute filters can be applied.
The Policy Modeling export command-line tool is executed from the command line using the following format:
OPMExport.exe <projectfile> <csvfile> [-entity=<entity text>]
[-all|-named|-mapped|-inferred|-top|-input|-goal|-joining|-unused]
[-search=<search text>] [-help]
The parameters used with the export command-line tool are explained in the following table.
| Parameter | Description |
|---|---|
<projectfile>
|
The full path and name of the project. |
<csvfile>
|
The full path and name of the CSV file to create. |
-entity=<entity text>
|
Exports attributes from a particular entity. If not provided, all entities will be used. |
-all
|
Exports all attributes. This is the default parameter. |
-named
|
Exports attributes that have names. |
-mapped
|
Exports attributes that have 'Mapped In' or 'Mapped Out' fields. |
-inferred
|
Exports attributes that are inferred. |
-top
|
Exports attributes that are top level. |
-input
|
Exports attributes that have 'Input' roles. |
-goal
|
Exports attributes that have 'Goal' roles. |
-joining
|
Exports attributes that have 'Joining' roles. |
-unused
|
Exports all attributes that are not used in a rule, collected on a screen, used as a custom goal or mapped. |
-search=<search text>
|
Filters attributes by matching the search text. The search is case-insensitive. If not provided, attributes will not be filtered. |
-help
|
Prints this help. If provided, all other parameters are ignored. |
Example 1 - Export all attributes for all entities
To export all attributes for all entities in the myBenefits project to a CSV file called DataModel, you could use the following command:
"C:\Program Files\Oracle\Policy Modeling\26A\bin\OPMExport.exe" C:\Projects\myBenefits\myBenefits.xprj C:\Projects\myBenefits\DataModel.csv
Example 2 - Export all named attributes for "the household member" entity
To export all named attributes in "the household member" entity from the myBenefits project to a CSV file called DataModel, you could use the following command:
"C:\Program Files\Oracle\Policy Modeling\26A\bin\OPMExport.exe" C:\Projects\myBenefits\myBenefits.xprj C:\Projects\myBenefits\DataModel.csv -entity="the household member" -named
Example 3 - Export all attributes that contain "expense"
To export all attributes from the myBenefits project that contain "expense" as part of the attribute text or attribute name to a CSV file called DataModel, you could use the following command:
"C:\Program Files\Oracle\Policy Modeling\26A\bin\OPMExport.exe" C:\Projects\myBenefits\myBenefits.xprj C:\Projects\myBenefits\DataModel.csv -search="expense"