Issue
Unable to run the SQL query, ‘Select * from <database_table>’, using Query runner.
The following error occurs in the Query runner on running the SQL query:
There has been an issue; please consult your system administrator.
The following Tracer error also displays on running the SQL query:
com.pega.pegarules.pub.clipboard.WrongModeException: The property resultPage.pxResults(1).class was of mode Page Group while com.pega.pegarules.data.internal.clipboard.ClipboardPropertyImpl.getStringValue() was expecting String mode. Details: (none)
Note: The query runs successfully when specific columns are selected instead of using the wildcard (*).
Steps to reproduce
Run the following SQL query using the Query runner:
Select * from <database_table>
Root Cause
The Column type is Page Group type, however expected type is String. Hence, the sourceTemp.getString API fails to retrieve the value, resulting in an empty value.
Solution
1. Open the pzGetSQLQuery activity.
2. Perform Private Edit
3. Open Step 6 (Java Step) and replace line number 55,
rowPage.putString("pyColumn"+j,sourceTemp.getString(propertyList.get(i)));
with the following code:
try {
rowPage.putString("pyColumn" + j, sourceTemp.getString(propertyList.get(i)));
} catch (Exception e) {
oLog.debug("The problem column is: " + propertyList.get(i));
rowPage.putString("pyColumn" + j, "");
}
4. Save the activity
This issue is planned to be addressed in future Pega Platform releases. Issues are prioritized based on impact, severity, and capacity. The specific releases for the fix has not yet been determined. This section will be updated with the release details when the fix for this issue is available.
References
Pega Platform database tools for Pega Cloud