Spark Table using CSV - Line Separator
Ryan Abbey
1,171
Reputation points
I'm trying to create a Spark table using a CSV as source. The CSV file has row delimiter of \r\n, however, the last field in the file is returning a \r when an empty string.
According to documentation, \r\n should be handled by default
-
lineSep
(default covers all\r
,\r\n
, and\n
): defines the line separator that should be used for parsing. Maximum length is 1 character.
This is clearly not the case but I am getting no change in the result should I specify the lineSep within the options (regardless of whether I try \r, \r\n or \n) which suggests it is something we can't override (or lineSep isn't the correct syntax), any other suggestions?
Thanks