Uploaded image for project: 'Commons CSV'
  1. Commons CSV
  2. CSV-110

Add ability to parse single lines

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • Review, 1.x
    • None
    • None

    Description

      Due to the iterator-based API of CSVParser, there is currently no simple and convenient way to parse single lines of CSV-formatted data. The intention of this ticket is to add something along the lines of the following:

      CSVLineParser lineParser = new CSVLineParser(csvFormat);
      String singleLine = "a,b,c";
      CSVRecord singleRecord lineParser.parseLine(singleLine);
      

      The use case of parsing single lines comes up very often in terms of distributed batch processing scenarios (i.e. Hadoop jobs), and CSV-style formats are also regularly used in such scenarios. Currently, projects are often forced to build their own ad-hoc CSV parsing solutions, so adding the ability to parse single lines to commons-csv would be very useful to these projects, as well as anyone doing parsing based on input that isn't necessary in the form of a single stream.

      Attachments

        1. CSV-110.patch
          7 kB
          Gabriel Reid

        Activity

          People

            Unassigned Unassigned
            gabriel.reid Gabriel Reid
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: