Activity steps to add values for Database Table records

I have data records with existing columns in the database table. Where I have the requirement to add additional column (Country )in the DB table and adding values in the new column for the existing records.

How can we achieve it by using activity steps? Could you please provide the step-by-step guide on updating value for the old records using activity steps?

Note: pyGUID is the unique value for all the records

Thanks in advance!

Hi @Sna05222: Is there a specific reason that you are looking update it using activity? If this is a Data type in Pega, you can use the export and import option in the Data table wizard to populate the data which will be much simpler that writing a activity for this.

Let us know if this won’t work for you so that the community can guide you with alternate options.

BTW, what will be the value of the new column for each records? Is it static (or) a different source?

Thanks.

@ArulDevan The value (Country) which we need to update in the existing row of the DB table, is the response receiving from external to Pega using Service-REST. So we are preferring Activities.

Could you please help me in this case.

@Sna05222

Can explore below OOTB activity

  1. Check If RSV is available to create a column if not you need create RSV onfly in activity.

  2. pzSaveDataTable OOTB API explore this activity and pass parameters as required

You can also check the OOTB Data type Edit column logic implemented in Pega

@Sna05222

Loop through the list and open each record using either the primary key or pzInsKey and property-set the country value for each record and save each record.