The Fix CSV file - escape embedded quotes instruction allows the user to fix any escaped double quotes in a CSV file and/or remove leading and trailing white space in each field.
This can be useful when a text extract does not import correctly due to unescaped quotes or has excessive white space padding one or more fields.
Step-by-step guide
- Create an action step as "Manipulate Data".
- Add the Fix CSV file - escape embedded quotes instruction:
3. Configure the details for the instruction:
It is quite simple to configure this instruction:
- Link to a text file stored in a data step property in a SolveXia process
- Select whether to "detect unescaped double quotes and fix them" and/or "remove the leading and trailing spaces for each field"
If you have done this successfully and run the step, the cell will now fix the text file according to your configuration:
For example, if both options are selected the following CSV input:
"column 1","column 2" "unescaped double quote -> "","escaped double quote -> """ leading and trailing spaces ,leading and trailing spaces
will be transformed into the following output on a successful run:
column 1,column 2 "unescaped double quote -> ""","escaped double quote -> """ leading and trailing spaces,leading and trailing spaces
Note:
- This step will also strip unambiguous double quotes around fields (see row 1)
- The double-quote character was escaped (see row 2)
- Leading and trailing spaces were removed (see row 3)
Comments
0 comments
Please sign in to leave a comment.