Question
futureproofAI
US
Last activity: 2 Oct 2019 14:45 EDT
Deploying a modified Marketing Output Template DB
Hi guys,
We are on Pega Marketing 8.1 on Pega Cloud.
We are writing our NBA execution results to a Postgress table via the Output Template rule.
At some point we added new fields to the Output Template, but we are experiencing issues to (1) get the Postgress table updated with the new columns and (2) deploying the code to higher environments.
(1) MAKING THE CHANGES IN DEV
This is what we are doing so far, but I would like to ask if there is a better way of doing it.
- We made the changes to the Output Template (say adding 1 new property and its mapping)
- Opened a Pega SR to get the Postgress table dropped or renamed (again, since we are in PegaCloud, we are not able to drop the table ourselves)
- We deleted the Database Table instance
- We ran the NBA, which qualified some offers associated to the modified Output Template
RESULT: The Database Table and physical Postgress table are re-generated again. The NBA results are successfully written to the table. All good. But is there a better way?
(2) DEPLOYING THE CHANGES TO STAGE/PROD
Here we are having some issues. We are trying 2 approaches but none of them are working right now:
APPROACH 1 (letting Pega regenerate the Table)
Hi guys,
We are on Pega Marketing 8.1 on Pega Cloud.
We are writing our NBA execution results to a Postgress table via the Output Template rule.
At some point we added new fields to the Output Template, but we are experiencing issues to (1) get the Postgress table updated with the new columns and (2) deploying the code to higher environments.
(1) MAKING THE CHANGES IN DEV
This is what we are doing so far, but I would like to ask if there is a better way of doing it.
- We made the changes to the Output Template (say adding 1 new property and its mapping)
- Opened a Pega SR to get the Postgress table dropped or renamed (again, since we are in PegaCloud, we are not able to drop the table ourselves)
- We deleted the Database Table instance
- We ran the NBA, which qualified some offers associated to the modified Output Template
RESULT: The Database Table and physical Postgress table are re-generated again. The NBA results are successfully written to the table. All good. But is there a better way?
(2) DEPLOYING THE CHANGES TO STAGE/PROD
Here we are having some issues. We are trying 2 approaches but none of them are working right now:
APPROACH 1 (letting Pega regenerate the Table)
- We created a Product rule with the new code, which also contains:
- the modified Output Template rule
- the required Properties mapped in the Output Template rule
- the DataTableEditorReport report definition corresponding to the Data Type
- We deployed the Product rule
- Opened a Pega SR to get the Postgress table dropped or renamed (again, since we are in PegaCloud, we are not able to drop the table ourselves)
- Once the table has been dropped, we deleted the Database Table instance
- We ran the NBA, which qualified some offers associated to the modified Output Template
RESULT: Initially the Database Table and Postgress table were created, but we forgot to include the new Property in the Product rule, so the table was missing a column. We repackaged and redeployed and followed the same steps, but now nothing is being generated (the Database Table and the physical Postgress table are not being created).
APPROACH 2 (including SQL for new table as part of deployment)
- We created a Product rule with the new code, which also contains:
- the modified Output Template rule
- the required Properties mapped in the Output Template rule
- the DataTableEditorReport report definition corresponding to the Data Type
- AND VERY IMPORTANTLY, the Database Table instance (which will make Pega run the CREATE TABLE SQL during Package Import)
- Opened a Pega SR to get the Postgress table dropped or renamed (again, since we are in PegaCloud, we are not able to drop the table ourselves)
- Once the table has been dropped, we deployed the Product rule (which includes the CREATE TABLE SQL)
- We re-saved the Database Table instance
- We ran the NBA, which qualified some offers associated to the modified Output Template
RESULT: The Postgress table is there but NO offers are being saved to it.
Any help would be greatly appreciated.
Thank you!
Marcelo.