We have a data set which processes a csv file. Now we have a requirement to add a column which has json data in it. However, since it is a csv file, the JSON data does not gets mapped as a string and it just takes the first key value pair ignoring the entire JSON as the delimiter used is comma(,). Any pointers as to how we can include the JSON in a CSV file and get it mapped properly as a string?
Thanks in Advance!
***Edited by Moderator Rupashree to add Capability tags***
@CDS07 In Pega, when processing a CSV file that contains JSON data, you can handle the JSON data as a string. To do this, you need to ensure that the JSON data is enclosed in quotation marks. This is because CSV files use a comma as a delimiter, and JSON data also contains commas. By enclosing the JSON data in quotation marks, you're telling the CSV parser to treat the entire JSON data as a single field. When configuring the File data set rule, you can specify the quotation mark type used for string values in the selected file. This will allow the JSON data to be correctly mapped as a string.
⚠ This is a GenAI-powered tool. All generated answers require validation against the provided references.