Testing SQL queries

To help with developing and debugging applications, you can test SELECT statements from the Query Runner landing page. You can run queries against non-BLOB columns in your database and view the results on the landing page or export the results to an Excel spreadsheet or .pdf file. A maximum of 500 rows are returned.

Before you begin: 
  • For the PegaRULES and PegaDATA databases, you need the PegaRULES:DatabaseAdministrator role or the pxViewandSelectQuery privilege in Data- and Rule- in your access group to access the Query Runner.
  • For external databases, you need to create a new access role similar to the PegaRULES:DatabaseAdministrator role. See Accessing database administration operations on Pega Community for more information.
  • For all databases, you must create a read-only user for the query to return a result.
The Query Runner is available for Pega Cloud customers who use a Postgres database or for customers using an Oracle database on-premises or in the Pega Cloud.
  1. In the header of Dev Studio, click Configure > System > Database > Query Runner.
  2. Click the Query Entry tab.
  3. In the Choose your database field, select the database you want to run the query against.
  4. In the Query to run against field, enter the query that you want to test. The query must contain the fully qualified name of the table.
  5. Click Run.
  6. Export the results into an Excel spreadsheet or .pdf file by clicking Export > Export to Excel or Export > Export to pdf.