Exploring an idea using CSVs generated by the Salesforce Bulk API, and the DataWeave script trips up on a rich text field.
I was surprised to see that DataWeave says that the Bulk API is outputting malformed CSVs.
Here's what I get:
Malformed CSV input. Ignoring following chars after quoted value at offset 41215: """><a href=""https...
Here's the matching field in prod:
<p style=""><a href="https
Does anyone here have suggestions on what I could/should do differently either with the bulk API or with DataWeave to be get past these errors?
Thanks in advance!
2 answers
Bulk API escapes the double quotes used in HTML tags with double quote, which is proper under RFC-4180. However I think DataWeave defaults escape to backslash, so it'd complain. Try specify the escape char in your script, something like
%dw 2.0
input payload application/csv escape='"'