Forum Discussion

akshay_patil218's avatar
akshay_patil218
New Contributor
6 years ago

How to append at last in csv

.

Hi team,

i need to append a tag at end of csv file, how can we do it

2 Replies

  • tstack's avatar
    tstack
    Former Employee

    If you’re writing to a file, one option would be to put a Mapper and a second FileWriter after the first FileWriter. The second writer would then be configured to Append to the file instead of overwriting it. The Mapper would be configured with a binary output view and maps the string </import> to $content. However, not all filesystems support appending to the file.

    I have to ask, though… Based on your screenshot, it looks like you’re writing XML? Can you use an XML Formatter? Or, is it XML encapsulated in CSV?

    • akshay_patil218's avatar
      akshay_patil218
      New Contributor

      [quote=“tstack, post:2, topic:5774”]
      a file, one option would be to put a Mapper and a second FileWriter after the first FileWriter. The second writer would then be configured to Append to the file instead of overwriting it. The Mapper would be configured with a binary output view and maps the string </import> to $content . However, not all filesystems support appending to the file.

      I have to ask, though… Based on your s
      ita XML formatted csv file.