Closed wuxiaomin98 closed 4 years ago
The above sample test file has one record. however, since the description field in a quoted string has new lines in it, it prints multiple records after parsing.
You are parsing a CSV with happens to use tabs as the separator. TSV has no notion of quotes. Use the CsvParser to process this input.
Hi @jbax , had a user case to parse tsv file.
We have a tsv file to parse and in a one of the fields, it contains new lines in it. For example:
id title description 1 titletest1 descriptiontest1 2 "titiletest2
newline" descriptiontest2
When I print out the record, seems it treats each line as a new record, it will print
Actually it should be two records:
I checked the TSV settings, it's different from the csv settings, not providing the setting to normalizeLineEndingsWithinQuotes. It can't parse the "\n" in a quoted string.
Any suggestion on this? Thanks!