Question
Eclatprime Digital Private Limited
IN
Last activity: 6 Jun 2024 4:02 EDT
SQL Query in Report Definition
Hi,
I want to see the SQL query in Report definition, I'm executing the report definition and getting the results, now I want to see the which SQL query is executed to fetch the results. Where I can find the SQL query in Clipboard Page.
Thanks,
Sai G
***Edited by Moderator Rupashree S. to add Capability tags***
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Maantic Inc
IN
In Standard thread, click on pyReportContentPage(Code-Pega-List).
Maantic Inc
IN
In the standard thread? Then the only way to find it under SQL steps in the tracer, keeping the DB query event turned on. Find the report in the tracer because a lot of SQL steps will be present.
HCL Technologies Limited
IN
It looks like properties pxSQLStatementPre and pxSQLStatementPost is removed from pyReportContentPage in 8 version. If you want to see the SQL generated, you can see it from tracer by enabling DB Query event in tracer settings.
Eclatprime Digital Private Limited
AU
Hi @Sai Guggilla,
In Pega, you can find the SQL query executed for a report definition in the "pxRetrieveReportData" step of the activity associated with the report, or directly in the "pxFetchStream" property of the clipboard page.
Thanks.
TSPI
US
Hi,
Within the pyReportContentPage
, find the pxResults
property.To see the SQL query executed for this report, look for the pxSQLQuery
property. It may be located under pxPerformance
or another related property, depending on the Pega version you are using.
Regards,
Poojitha Behara.
Updated: 6 Jun 2024 1:38 EDT
Rulesstack Private Limited
IN
Hi @Sai Guggilla,
Pega doesn't directly store the executed SQL query within the Clipboard Page after running a Report Definition.
1. Enable Tracer with DB Query:
- Go to tracer and enable the "DB Query" option in Tracer.
- Run your Report Definition.
- After execution, switch back to Tracer and navigate to the "SQL " step. This will display SQL query in tracer.
Updated: 6 Jun 2024 4:02 EDT
Tata Consultancy Services
IN
Do you mean, below mentioned below two properties ? Pega no longer maintaining these two properties on the Clipboard ( pyReportContentPage )
pxSQLStatementPost and pxSQLStatementPre
Generated SQL during Report Definition execution and Database Query Extractor
Enable the DB Query in Tracer,
Even Type --> SQL: Click on the step, the query that is present in SQL attribute is Pre SQL
Even Type --> Package Results: Click on the step, the query that is present in SQL attribute is Post SQL
I hope this will help you.
Thanks,
Ashok