Question
CitiCorp
IN
Last activity: 18 Jun 2018 1:27 EDT
How to view the Table properties & values in Pega ?
Can anyone Please suggest how to view the Pega DB tables properties and values for a case?
For Example, I have created a case type with properties/data models like Customer name, number, Address etc, for each of the case different data will be stored in PEGA DB....How can i view these properties values using DB tools like Mysql, SQL Developer, Toad etc. (or) is there some other way?
Thanks in Advance....
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Larsen & Toubro Ltd
IN
Hey, if you are using V7.3, you can use Query Runner in the Pega Developer Portal to view the table data by running select queries.
Pegasystems Inc.
US
Just like for another application, you can write SQL queries to view properties/values.you need o be aware in which table the respective data is sored.
For example:
select * from table name./ select username, age, from table name.
In PRPC, you will find these tables(where work object details are stored) under data schema. Please let me know in case I misunderstood our question.
-
Matthew Bulley Parag Maheshwari
CitiCorp
IN
Hi Rachit,
Thanks for the Response, but other than OBJ and RDB methods in Designer Studio... is there any other way to view the table values in Back-end using a DB tool.
EPAM Systems, Inc.
ES
Hi,
Thanks for posting on PSC.
There are multiple ways to retrieve the value of the table from database.
From designer studio, you could write an activity in the class which case belongs to or the properties belongs to. In the activity, you could invoke Obj methods to retrieve the value, it's somehow similar to SQL statements as it generates the same in the background.
More about Obj-Methods,
- Obj-Browse:
Use the Obj-Browse method to search instances of one class and copy the entire instances, or specified properties, to the clipboard as an array of embedded pages.
Only properties exposed as columns can be used as selection criteria. However, values of properties that are not exposed as columns, including embedded properties, can be returned.
Refer: Obj-Browse configuration and other parameters.
Obj-Open:
Use the Obj-Open method to open an instance stored in the PegaRULES database or in an external database linked to an external class, and save it as a clipboard page.
Hi,
Thanks for posting on PSC.
There are multiple ways to retrieve the value of the table from database.
From designer studio, you could write an activity in the class which case belongs to or the properties belongs to. In the activity, you could invoke Obj methods to retrieve the value, it's somehow similar to SQL statements as it generates the same in the background.
More about Obj-Methods,
- Obj-Browse:
Use the Obj-Browse method to search instances of one class and copy the entire instances, or specified properties, to the clipboard as an array of embedded pages.
Only properties exposed as columns can be used as selection criteria. However, values of properties that are not exposed as columns, including embedded properties, can be returned.
Refer: Obj-Browse configuration and other parameters.
Obj-Open:
Use the Obj-Open method to open an instance stored in the PegaRULES database or in an external database linked to an external class, and save it as a clipboard page.
The system uses the specified class and key fields to find and open the object and place its data into the specified step page. The system searches up the class hierarchy as appropriate to find the instance. If it finds the specified step page, the system clears any data that is on it and reuses the page. If no existing page has a name matching the specified step page, the system creates a new page.
Except in rare cases, identify in the Step Page field the name of a page to be created by this method. If the Step Page field of the step is blank, this method opens the object into the primary page of the current activity, replacing the current contents of the primary page and changing the class of the primary page if necessary to match the class of the object. Typically, this is not desirable.
Refer Obj-Open for configuration and other details.
Obj-Open-By-Handle:
The handle of an instance is a unique key, in an internal format, assembled by the system that identifies an instance in the PegaRULES database. It may differ from the visible key generally used to identify instances. (Every instance has a unique handle, but more than one instance may share the same visible key.) For rule instances, the handle includes system-generated identifying values (including the create date and time) that make it unique.
Use the Obj-Open-By-Handle method only if you can determine the unique handle that permanently identifies which instance to open. Otherwise, use the Obj-Open method.
Rows of a view (rather than in a table) in the PegaRULES database do not have a handle. This method cannot be used with classes corresponding to views.
When used on a primary page, this method clears any data on the page and reuses its name and position in an embedded Page List.
An external class (defined through the Connector and Metadata wizard) may not contain one property that can serve as a handle. To support the Obj-Open-by-Handle method with external classes, a substitute string is assembled from the key columns of the table.
Refer Obj-Open-By-Handle.
From Backend, you could run the queries as per database type. Use respective for Postgres, Oracle and other databases.
If you want to know the class mapping to the database table. Open that particular class definition in the designer studio. Click "Test Connection", a popup window will appear. In the popup screen, you could see the respective database mapping, use this table name in the SQL query for retrieving data.
Report Definitions could also be used to get the data from a table or multiple tables based on join conditions configured.A report definition rule defines a report definition report. This rule generates an SQL query that retrieves and sorts information from the PegaRULES database, an external database, or an Elasticsearch index, and generates HTML that displays the results in a variety of formats. You have a range of options for interacting with the results, depending on the settings on the Report Viewer tab.
More about Report Definitions.
Hope this information gives you the brief idea about your query, kindly acknowledge by marking this reply as answered/helpful for larger Pega audience and tracking purposes.
Regards,
Asif
-
Abhishek Pabitwar
CitiCorp
IN
Hi Asif,
Thanks for providing info on OBJ methods and Report Definition. Could you explain in detail about how to connect through Backend, and how to config the Postgres or oracle DB through some DB tool.
Regards,
Prasanth
Accepted Solution
Larsen & Toubro Ltd
IN
Hey, if you are using V7.3, you can use Query Runner in the Pega Developer Portal to view the table data by running select queries.
Coforge DPA
IN
Hi
There will be function pr_read_from_stream check the function/proc in the database example.
pr_read_from_stream('pzInsKey', pzInsKey, pzPVStream)