Posted: 14 Feb 2018 3:55 EST Last activity: 14 Feb 2018 7:06 EST
Class and Rule Set creation for MS SQL Database table
Thank you for your support.
I have connected to MS SQL Server Database from Pega, now I wanted to create the Class , Ruleset and Objects for corresponding to the Database table ( Employee ).
I tried to create the class from DataModle ----> Class & Properties ----> Database Class Mapping, but it is asking me to select the existing rule set for creating the class. not sure which one do I need to select? Can't I create the new Ruleset for this table Employee ? Is it necessary to create the new Ruleset or Class ?
If you have the table in the external database and you want to access it into your existing Pega application then you can map the external table with the Class in your application by using Database Class Mappings wizard as shown in the attachment.
For example, in my scenario i created a new table TABLE1 in my PegaData database under PRPC722DATA schema and wants to map this table to a Class in my application which is shown in my attachment.
To create the Class OSM47A-Jenkins-Data-TABLE1 we need to choose the Ruleset name and version, in my scenario i am trying to map my table into my existing application Jenkins which has the ruleset Jenkins.
Could you explain, what you mean by trying to create Data Model(DataModle)? Yes, there you need to select an existing ruleset from drop down. Database mapping table rule needs to be associated with a ruleset, thus you need to select one.
You can create a new ruleset prior to using database mapping tool and then the newly created ruleset would also appear in the drop-down for selection and then class name is automatically populated based on concatenating your database table name and standard "Data-" hierarchy.
To answer your question, is it necessary to create the new Ruleset or Class:-
It's not necessary at all, though it's as per your business requirements. Also, the class is automatically created as explained in the link provided above in the comment.
Hope it clarifies your doubt, kindly notify if it does.
By creating the Datamodel for the external table ( MS SQL Server ), I wanted to use this table to create a Dashboard in Pega. for creating the Dashboard, Do i need to create a application ?
please correct me if my understanding is wrong. so for every external table mapped in Pega , I can use only one ruleset or I can create a new rule set for every table? what is the use of the ruleset in this scenario ? Does it store the access path to the external table or some thing else.
If you want to use this external table into your current application then you can use the same ruleset for all the external tables which you are mapping with the classes, or you can also create a separate ruleset to store all the external mapped classes then add this ruleset to your current application ruleset stack.
Important:By the way while creating any new class you need to provide the ruleset name and its version in order to create it, here the wizard will only tries to create the Class but not the Ruleset. You need to provide the existing Ruleset name and its version to the wizard so that it will create the Class with the help of that Ruleset information.
Hope this clears your doubts and you can try to provide the new ruleset name and version into the wizard which is not available in the application which will throw the error.
It is very good explanation. in my requirement still I haven't created the application. my requirement is to create the dashboard. so first I try to create the database connection , properties and then the Dashboard.
database connection and property are able to create. could you please help to understand how to use these properties to create the Dashboard in Pega ?
do you have any documentation ? Do I need to create the application for this Dashboard ?
I don't understand what is your exact requirement about dashboard, could you please elaborate what is this additional requirement with a new post as the current requirement in this post is already answered above.