Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-21678

Disabling quotes while writing a dataframe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 2.2.0
    • None
    • SQL
    • None

    Description

      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 :

      L"\, p' Y a\, C G
      

      is written as

      "L\"\\, p' Y a\\, C G\\, H"
      

      i.e double escapes the next already escaped values.
      and if i myself escape like :

      L\"\, p' Y a\, C G
      

      then that is written as

       "L\\"\\, p' Y a\\, C G\\, H"
      

      How do we just disable this automatic escaping of characters?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              taransaini43 Taran Saini
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: