Question

ASB
IN
Last activity: 9 Feb 2024 7:07 EST
How to replace Databaseviews during Migration to Pega Cloud
We have a database view in system to fetch hierarchy of employees. This databae view is currenlty mapped to a class using DATA-ADMIN-DB-Table. We have report definition defined on this class and using that report definition widely in our applications. SQL QUERY USED for the DATABASE view.
CREATE VIEW DATA.EmpHierarchy AS
WITH emphierarchylist
(loginid,employeenumber,supervisoremployeenumb) as
(SELECT (loginid,employeenumber,supervisoremployeenumb FROM pr_ASB_StaffUp_Data_Employees
UNION ALL
SELECT eh.loginid,eh.employeenumber,et.supervisoremployeenumb FROM emphierarchylist eh
JOIN pr_ASB_StaffUp_Data_Employees et
on (eh.supervisoremployeenumb = et.employeenumber ))
SELECT emph.loginid,emph.employeenumber,emph.supervisoremployeenumb,
supd.loginid as "supervisorloginid" from emphierarchylist emph
LEFT JOIN pr_ASB_StaffUp_Data_Employees supd on
emph.supervisoremployeenumb = supd.employeenumber;
WE KNOW THAT database views will not be supported in Pega cloud. This DATABASE VIEW uses UNION in the query. How do we achieve this UNION with report definition in Pega cloud? we do not want to use CONNECT-SQL SINCE our organization doesn't encourage using Custom SQL. SO is there any way Pega report definition supports the generation of above query using UNION?
***Edited by Moderator: Marije to add Case tags***