Skip to content

Commit

Permalink
Add support for CSV escape character to EntityDataLoaderImpl
Browse files Browse the repository at this point in the history
  • Loading branch information
puru-khedre authored and dixitdeepak committed Aug 22, 2024
1 parent 765f28c commit 08fe867
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class EntityDataLoaderImpl implements EntityDataLoader {
char csvDelimiter = ','
char csvCommentStart = '#'
char csvQuoteChar = '"'
char csvEscapeChar = '\\'

String csvEntityName = null
List<String> csvFieldNames = null
Expand Down Expand Up @@ -925,6 +926,7 @@ class EntityDataLoaderImpl implements EntityDataLoader {
.withSkipHeaderRecord(true) // TODO: remove this? does it even do anything?
.withIgnoreEmptyLines(true)
.withIgnoreSurroundingSpaces(true)
.withEscape(edli.csvEscapeChar)
.parse(reader)

Iterator<CSVRecord> iterator = parser.iterator()
Expand Down

0 comments on commit 08fe867

Please sign in to comment.