Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Viewing database class mappings

Updated on May 11, 2022

The Database Class Mappings tab displays all current database mappings for the selected class category. This information is derived from Data-Admin-DB-Table data instances and queries to the Pega Platform database.

Access this tab from the Classes and Properties landing page by clicking ConfigureData ModelClasses & PropertiesDatabase Class Mappings.

To display mappings for classes in the Pega- rulesets, click Include Pega- Application.

The database and relational database table in the database that class is mapped to, the number of columns that are in the table, and the number of those columns that are exposed to the interface is displayed for each matching class.

FieldDescription
Class The name of the class. To open the form for the class, select its name. If there is an explicit class-to-table relationship defined for the class using a database table instance ( Data-Admin-DB-Table ), you can click the Database table icon to open the database table form and edit it.
TableThe relational database table in the database that the class is mapped to.
RowsThe number of rows in the relational database table.
ColumnsThe number of columns in the database table. Click the number to display an exportable list of columns that includes their data types and sizes.
Exposed/Mapped For internal tables the number of properties exposed in the table. Click the number to display an exportable report of the properties. If there is an issue with the number of columns exposed, click the Alert icon for details.

For external tables, the count indicates the number of properties mapped to the corresponding columns in the external table. Click the count to display the mapped properties. If there is an issue with the mapping, click the Alert icon for details.

DatabaseThe relational database where the table is located. Click the database name to open its form for editing.
StatusA green icon appears if the connection to the database is good; if there is a problem, a red icon appears. Click the icon to see details in a pop-up report.
Edit Click Edit to make changes to an already mapped table.
Note: You can only update the ruleset version and Property name fields, select additional columns to map, and add new keys to the class.

External table mapping

Use the New External Database Table Class Mapping button or the Edit button (for externally mapped classes only) to create a new database table instance or edit an existing database table instance and properties that associate a class (and its derived classes) with an existing relational database table or view in the Pega database or an external database. (The external table mapping feature is not available on Pega Cloud.)

If you are using a NoSQL database, do not use this option to associate a class with the database. Instead, create a data type and associate it with your NoSQL database by updating the Database field on the Database tab of the database table associated with the data type.

Database NameRequired. Select the Database instance that holds the table you are connecting to.
Schema nameSelect the schema name associated with the table you are mapping to.
Table NameRequired. Select the table you will use to generate the class, properties, and database table instance.
RuleSet NameRequired. Select an existing ruleset to contain the generated rules.
RuleSet VersionRequired. Select the version of the ruleset for the generated rules.
Class NameEnter the name of a non-abstract class to be created and mapped to the external table.

The information you enter is saved in the External Mapping tab of the class rule.

KeyCheck the box to indicate that the associated property or properties will be designated as keys for the generated class. Columns that are keys to the table will also be keys to the generated class. The Key cannot be edited once the external table has been mapped.
Column NameThe name of the column in the database table.
Data TypeThe database specific data type, as defined when the column was added to the table.
Map FromIndicates that columns from the database table will be mapped to properties in a class.
Property NameThe name of the newly created property. By default, the Property Name is set to the Column Name.
Property TypeThe type of property that will be created. This is dependent on the Data Type.
Map All/NoneSelect the check box to create the property. Select the Map All/None check box to select or deselect all the columns in the table.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us