Announcement Announcement Module
Collapse
No announcement yet.
Writing CSV-files with quoted fields Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Writing CSV-files with quoted fields

    The DelimitedLineTokenizer can parse lines with quoted strings. The DelimitedLineAggregator, however, simply concatenates the FieldSet items without any quoting or looking for delimiter characters in the string.

    Where's the best place to add this behavior? In a custom FieldSetCreator or a subclass to DelimitedLineAggregator? It's the aggregator that knows what the delimiter is, so maybe a subclass is the answer. But the delimiter is not protected and has no getter...

  • #2
    I would recommend to use the FormatterLineAggregator, but it looks like you are using Batch 1.x. In that case it's your choice, but I suspect that you get more control in the FieldSetCreator (which doesn't exist in 2.0 because this kind of use case is slightly awkward).

    Comment

    Working...
    X