[ 
https://issues.apache.org/jira/browse/NIFI-6745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16953380#comment-16953380
 ] 

Otto Fowler commented on NIFI-6745:
-----------------------------------

If you could create a template with the generate flow file processor -> 
convertrecord etc etc and attach, it would help to make sure that everyone is 
looking at the same thing

> No possiblity to set empty string as escape character
> -----------------------------------------------------
>
>                 Key: NIFI-6745
>                 URL: https://issues.apache.org/jira/browse/NIFI-6745
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.9.2
>            Reporter: N
>            Priority: Trivial
>
> In a traditional csv parser like excel if you want to include a comma in a 
> field you encapsulated it with quotes ("foo,bar") and if you need quotes 
> between those quotes you add another pair of quotes before it ( "she 
> said:""foo""" )
> however, in your csv parser there is another rule which says that '\' is a 
> classic escape char and you can't disable it, this is a problematic rule 
> because:
> If you have a csv which contains a JSON as a string inside one of his fields 
> like (1,test,"\{""foo"":""bar""}") and you want to add a ' " ' inside it you 
> need to add a ' \' before it(1,test,"\{""foo"":""b\""r""}") because you need 
> to escape the " for the JSON parser, but in your csv parser this example will 
> fail becuse it will be parsed to "\{""foo"":""b"r""}")" which is invalid ( 
> the exemple sould becomeĀ \{"foo":"b/"r"} ) .
> In order to fix this adding the optoin to disable the escape char in the csv 
> parser will fix this problem.
> And by the way why is there an escape char in a csv parser any ways?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to