[
https://issues.apache.org/jira/browse/NIFI-6745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16945823#comment-16945823
]
Otto Fowler commented on NIFI-6745:
-----------------------------------
What processor or service/reader are you referring to? Do you have an example
csv file that doesn't parse? An example flow?
The documentation of the [CSVReader](https://nifi.apache.org/docs/nifi-docs/)
seems to state that you can
- select different csv parser implementations
- change the escape character
> 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)