Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-2341

Configurable CSV format of SPARQL query output

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Jena 4.5.0
    • None
    • ARQ, Jena

    Description

      org.apache.jena.riot.resultset.rw.ResultsWriter outputs a CSV where some fields are double quoted and some are not, based on their content (this is fully compliant with RFC-4180), for example:

      entity,language
      http://test.org/c1,""
      http://test.org/c2,en

      Output format configuration makes it more flexible for subsequent processing. For example, parsing of CSVs which contain double quotes all the times simplifies their processing, once  a custom parser needs to be used:

      This feature request is to allow the ResultsWriter clients to decide when to use double quotes - e.g. like https://commons.apache.org/proper/commons-csv/apidocs/org/apache/commons/csv/QuoteMode.html

      However, given this minimal requirement, an option would be to have a fully OpenCSV compliant implementation of CSV output similarly to CSV parsing (JENA-699) and allow other configurations too (e.g. the quote symbol, as per https://commons.apache.org/proper/commons-csv/apidocs/org/apache/commons/csv/CSVFormat.html).

      (The discussion to this issue can be found at JENA-2338)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              psiotwo Petr Křemen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: