[
https://issues.apache.org/jira/browse/SPARK-21678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120037#comment-16120037
]
Takeshi Yamamuro commented on SPARK-21678:
--
I think, if spark sets `setCharToEscapeQuoteEscaping("\0")` in
CsvWriterSettings below, the output is a thing like what you want.
But, I'm not sure that we should add these entries option-by-option there. cc:
[~hyukjin.kwon]
https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVOptions.scala#L151
> Disabling quotes while writing a dataframe
> --
>
> Key: SPARK-21678
> URL: https://issues.apache.org/jira/browse/SPARK-21678
> Project: Spark
> Issue Type: Bug
> Components: SQL
>Affects Versions: 2.2.0
>Reporter: Taran Saini
>
> Hi,
> I have the my dataframe cloumn values which can contain commas, double quotes
> etc.
> I am transforming the dataframes in order to ensure that all the required
> values are escaped.
> However, on doing df.write.format("csv")
> It again wraps the values in double quotes. How do I disable the same?
> And even if the double quotes are there to stay why does it do the following :
> {noformat}
> L"\, p' Y a\, C G
> {noformat}
> is written as
> {noformat}
> "L\"\\, p' Y a\\, C G\\, H"
> {noformat}
> i.e double escapes the next already escaped values.
> and if i myself escape like :
> {noformat}
> L\"\, p' Y a\, C G
> {noformat}
> then that is written as
> {noformat}
> "L\\"\\, p' Y a\\, C G\\, H"
> {noformat}
> How do we just disable this automatic escaping of characters?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org