Question
PKUtech Co., Ltd
JP
Last activity: 22 Dec 2019 22:27 EST
Database in Pega
How can I see data in Pega Database?
Is there any function like SQL such as select*...?
I would like to check if data is saved successfully after executing "Obj-save" in activity...
I am looking forward to your reply!
***Edited by Moderator Marissa to update platform capability tags****
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
IN
You need to mention the name of the property with dot in the query tab. For example- .pro1
Pegasystems Inc.
US
Hi,
The system should alert you if an issue causes the data to not be persisted, but if you'd like to explicitly confirm there are a couple of different options that I can think of offhand (beyond using external DB tools to directly query the database).
You can use a report definition to retrieve one or more of the type of objects you are saving in your activity:
You could also reopen the object from the database (either via the UI on a portal, or via an activity) and check the clipboard to confirm that the data pulled from the DB matches what you saved.
Hope this helps!
-Kurt
PKUtech Co., Ltd
JP
Thank you. You mean, If I create report definition,data can be retrieved from database?
Pegasystems Inc.
IN
Yes Report Definition will retrieve the data from the database.
In addition there is another option to use query runner (https://community.pega.com/knowledgebase/articles/pega-cloud/query-runner-landing-page-testing-select-statements), but the query runner functionality is available for Pega Cloud clients who use a Postgres database or for clients using an Oracle database on-premises or in the cloud.
PKUtech Co., Ltd
JP
Thank you! I am a little bit confused about retrieving data from database. Is there any friendly procedures?
1. create report definition
2.setting a table with the report definition
Pegasystems Inc.
IN
If you create a report definition in the class for which you want to check the value of the property then you will not have to explicitely mention the table name or any join.
For example your class structure is ABC-XYZ-work-CaseType1 where CaseType1 is your Case Type. Now if you have prop1 and prop2 2 properties created in CaseType1 and you want to check the values of these 2 properties of the work object then create a Report definition in this class (ABC-XYZ-work-CaseType1). Mention the two property names in the query tab, save the report and run the report.
PKUtech Co., Ltd
JP
when i try to create Report definition like below, error has occurred because of unvalid property..
ABC-XYZ-Work-Casetype1-pro1
ABC-XYZ-Work-Casetype1-ReportDefinition
error is below when i try to save Reportdefinition.
"Property name -This is not a valid property, or this is a property that cannot be used here"
Accepted Solution
Pegasystems Inc.
IN
You need to mention the name of the property with dot in the query tab. For example- .pro1
PKUtech Co., Ltd
JP
Thank you! it works!
PKUtech Co., Ltd
JP
Sorry again, how do I connect report definition to database?
Pegasystems Inc.
IN
When you create RD in class ABC-XYZ-Work-Casetype1 and mention the property of the this class in RD by default the table mapped to this class gets mapped to this RD. You don't have to explicitly map the DB table.
PKUtech Co., Ltd
JP
after executing "run" , the end of the case, I can check data in pyWorkPage of clipboard, but I cannot find it in any database and data page" D_xxx". How can I see the content in database? I created report definition to check data in database, but nothing seems to come...
Pegasystems Inc.
IN
Have you configured a Data Page? You will see the result in the Data Page only if you have a configured a Data Page sourced with the report definition.
Also what do you mean by "I cannot find it in any database" ? Where exactly are you checking the values in the DB? Are the properties that you are checking exposed? If the properties are not exposed you will not be able to see the data as they will be stored in BLOB (pzpvstream).