spark-csv icon indicating copy to clipboard operation
spark-csv copied to clipboard

Use the same library when Reading and Writing CSV

Open abendada opened this issue 10 years ago • 3 comments

  • Added Escape Character
  • Use CSVPrinter when writing CSV Files

abendada avatar Mar 19 '15 16:03 abendada

@abendada Would you add tests for this and make it pass?

falaki avatar Mar 25 '15 19:03 falaki

I added a test for escape The test consist of:

  • reading a csv file with "" as escape character
  • check the parsed content
  • save the dataFrame as a temp file without providing an escape character the default (") is used if necessary
  • check that temp file is well formed
  • read the temp file and check that the content well parsed

Note: quote and escape should have Character as type so nullable.

abendada avatar Mar 26 '15 13:03 abendada

@abendada left a few comments. Would you please also update the README for the new escape character option, and rebase this? Thanks!

falaki avatar Mar 26 '15 19:03 falaki