Close popover
Petar Hristozov (PetarHR)
Louis Dreyfus Company
Senior Developer LowCode & Pega
Louis Dreyfus Company
PetarHR Member since 2018 14 posts
Louis Dreyfus Company
Posted: May 12, 2020
Last activity: May 12, 2020

Modify CSV column names upon upload

Hi All, 

We have a simple requirement with a tricky part - we need to upload a CSV file into a Data Page in Pega.

Here comes the tricky part - the columns in the CSV have special characters in them (example screenshot below). You can see that there are blank spaces in the column names and event names that consist only of special characters like the "+/-" one.

CSV template

We are using the OOTB pxUploadCSVResults activity and we want to map the CSV columns to the right properties in Pega.

We were able to do so by copying the pxUploadCSVResults logic in our stand-alone activity and directly modifying the Java step to remove the empty spaces. 

Java step

This allows us to remove the empty spaces within the property names. 

However we want to use the standard OOTB activity and leverage the pxPreCSVUpload placeholder step to do the column name modifications. This brings me to my questions: 

1. Is there a way we can read and modify the uploaded CSV file content from another activity like the pxPreCSVUpload placeholder?

2. Is there an OOTB activity or approach that we can follow to do column name modifications in such scenarios?

3. Is there another approach that you know in order to have these columns mapped to the properties in Pega?

Kinda Regards, 

Petar Hr.

Pega Platform 8.2.6 Data Integration Java and Activities Other Industry System Architect