Uploaded image for project: 'Apache Freemarker'
  1. Apache Freemarker
  2. FREEMARKER-173

[freemarker-generator] Allow to pass arbitrary key/value pairs to DataSource when using NamedURIs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      On the command line a "NamedUri" is used to define data sources to be created

      users.csv
      file:///users.csv
      users=users.csv
      name:group=users.csv
      users=file:///users.txt#charset=UTF-16&mimetype=text/csv
      http://google.com#charset=UTF-16
      

      The current implementation supports picking up the following parameters to be passed to a DataSource (found in the fragment part)

      • charset
      • mimetype

      It make sense to parse arbitrary name/value pairs and pass it to the DataSource being created

      examples/data/csv#format=DEFAULT
      some/csv/directory#charset=UTF-16&format=EXCEL
      examples/data/csv/transactions.csv#delimiter=TAB&charset=UTF-8
      

      As shown in the examples the fragment parameters should be applies to an individual file or a group of files loaded from a directory

      Attachments

        Activity

          People

            sgoeschl Siegfried Goeschl
            sgoeschl Siegfried Goeschl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: