Question

3
Replies
151
Views
MarceloMarote Member since 2012 5 posts
Merkle, Inc
Posted: 11 months ago
Last activity: 11 months 2 weeks ago
Solved

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.

  1. We made the changes to the Output Template (say adding 1 new property and its mapping)
  2. 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)
  3. We deleted the Database Table instance
  4. 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)

  1. We created a Product rule with the new code, which also contains:
    1. the modified Output Template rule
    2. the required Properties mapped in the Output Template rule
    3. the DataTableEditorReport report definition corresponding to the Data Type
  2. We deployed the Product rule
  3. 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)
  4. Once the table has been dropped, we deleted the Database Table instance
  5. 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)

  1. We created a Product rule with the new code, which also contains:
    1. the modified Output Template rule
    2. the required Properties mapped in the Output Template rule
    3. the DataTableEditorReport report definition corresponding to the Data Type
    4. AND VERY IMPORTANTLY, the Database Table instance (which will make Pega run the CREATE TABLE SQL during Package Import)
  2. 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)
  3. Once the table has been dropped, we deployed the Product rule (which includes the CREATE TABLE SQL)
  4. We re-saved the Database Table instance
  5. 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.

Pega Marketing
Share this page LinkedIn