Question
CYBG
GB
Last activity: 4 Jul 2023 19:50 EDT
How does PRPC know how to create a table view during an import?
1. We have a class that maps to a table view. The view takes data from three tables. All works correctly:
CREATE ABC_VIEW AS
SELECT A, B, C FROM TABLE_1
UNION ALL
SELECT A, B, C FROM TABLE_2
UNION ALL
SELECT A, B, C FROM TABLE_3
;
2. I create a class that points to the view via a DB table rule, so that reports can be run, etc..
3. I now create a RAP and import to new environment where the view does not exist, and I include the class. At import PRPC identifies that the view needs creating and produces a create script (see above) that correctly identifies the three tables and the necessary SELECT statement to produce it.
My question is: given that the view definition was never defined anywhere in PRPC, how does it know how to create the view? Does it extract the information from the DB during creation of the Product rule?