Posted: 12 May 2020 2:09 EDT Last activity: 12 May 2020 2:27 EDT
Modify CSV column names upon upload
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.
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.
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?