LinkedIn
Copied!

Table of Contents

Viewing database class mappings

Version:

Only available versions of this content are shown in the dropdown

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 Configure Data Model Classes & Properties Database 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.

Field Description
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.
Table The relational database table in the database that the class is mapped to.
Rows The number of rows in the relational database table.
Columns The 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.

Database The relational database where the table is located. Click the database name to open its form for editing.
Status A 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.
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 Name Required. Select the Database instance that holds the table you are connecting to.
Schema name Select the schema name associated with the table you are mapping to.
Table Name Required. Select the table you will use to generate the class, properties, and database table instance.
RuleSet Name Required. Select an existing ruleset to contain the generated rules.
RuleSet Version Required. Select the version of the ruleset for the generated rules.
Class Name Enter 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.

Key Check 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 Name The name of the column in the database table.
Data Type The database specific data type, as defined when the column was added to the table.
Map From Indicates that columns from the database table will be mapped to properties in a class.
Property Name The name of the newly created property. By default, the Property Name is set to the Column Name.
Property Type The type of property that will be created. This is dependent on the Data Type.
Map All/None Select 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 Collaboration Center to ask questions, engage in discussions, share ideas, and help others.