Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4555

Expand SYSCS_IMPORT_TABLE to accept CSV file with header lines

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 10.13.1.0
    • Miscellaneous
    • None
    • Normal
    • Newcomer

    Description

      The SYSCS_IMPORT_TABLE (and SYSCS_IMPORT_DATA) function allow import of data from external resources. In general, they can process CSV files that created with various tools - with one exception: the header line.

      While there is no accepted standard, most tools will include a header line in the CSV file with column names. This convention is supported in Excel and many other tools.

      My Request: extend the SYSCS_IMPORT_TABLe and SYSCS_IMPORT_DATA (and other related procedures) to include an extra indicator for the number of header lines to be ignored.

      As an extra bonus it will be help is the SYSCS_IMPORT_DATA will accept column names (instead of column indexes) in the 'COLUMNINDEXES' arguments. E.g., it should be possible to indicate COLUMNINDEXES of '1,3,sales,5,'. This feature will make it significantly easier to handle cases where the external input files is extended to include additional columns.

      Attachments

        1. z.sql
          0.6 kB
          Richard N. Hillegas
        2. Varargs.diff
          6 kB
          Danoja Dias
        3. skipHeaders.diff
          12 kB
          Danoja Dias
        4. repro.java
          2 kB
          Danoja Dias
        5. repro.java
          2 kB
          Bryan Pendleton
        6. repro.java
          2 kB
          Bryan Pendleton
        7. petlist.csv
          0.0 kB
          Danoja Dias
        8. petlist.csv
          0.1 kB
          Danoja Dias
        9. petlist.csv
          0.1 kB
          Danoja Dias
        10. NoVarargs.diff
          5 kB
          Danoja Dias
        11. noHeaderLines.csv
          0.0 kB
          Bryan Pendleton
        12. LineNumberIssue.diff
          0.5 kB
          Danoja Dias
        13. latest.diff
          8 kB
          Danoja Dias
        14. hardCoded.diff
          1 kB
          Danoja Dias
        15. gotException.diff
          7 kB
          Danoja Dias
        16. addNewSystemProcedureWithTest.diff
          14 kB
          Danoja Dias
        17. addNewSystemProcedureWithTest_1.diff
          14 kB
          Danoja Dias
        18. addNewSystemProcedure_1.diff
          11 kB
          Danoja Dias

        Issue Links

          Activity

            People

              Dnj Danoja Dias
              yairlenga Yair Lenga
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: