constellation icon indicating copy to clipboard operation
constellation copied to clipboard

Importing from file - java.lang.NumberFormatException: For input string: "ERRO" when header row is included in the data

Open GammaVel opened this issue 1 year ago • 0 comments

Prerequisites

  • [X] Put an X between the brackets on this line if you have done all of the following:

    • Running the latest version of Constellation

    • Attached the Support Package via Help > Support Package

    • Checked the FAQs: https://github.com/constellation-app/constellation/wiki/FAQ

    • Checked that your issue isn’t already filed: https://github.com/constellation-app/constellation/issues

    • Checked that there is not already a module that provides the described functionality: https://github.com/constellation-app/constellation/wiki/Catalogue-of-Repositories

Description

This is a small edge case to do with importing from a CSV file which has date/time field mapping set and the header row included in the loaded data.

A runtime error is being displayed during the import from file process, if you have not selected the "File has headers" and the header row is included on the first line of the import and the date mapping has been applied to the column.

When the date time field is applied to the column, the header row contents are being shown as ERROR. It is still possible to select the import button. When this is done a runtime error is displayed : java.lang.NumberFormatException: For input string: "ERRO" (full details below)

Steps to Reproduce

  1. Select a sample CSV file which includes a date/time field and has a header row which is the column titles

  2. Choose Destination - Analytic graph - do not select the "File has headers" option

  3. Observe in the preview that the column headings are present as the first line

  4. Apply the date/time to the date time column

  5. Observe the column heading for the date/time has ERROR as expected image

  6. Complete the rest of the file mapping and select import > Run time error is displayed >

  7. Repeat with another file to make sure this is repeatable > it is

Expected behaviour: The error field is ignored and the import completes with a message saying how many error rows were ignored

Actual behaviour: Run time error > I need to manually correct this error by turning on the option for file has headers (hence this is not a big issue) Reproduces how often: 100%

Additional Information

image

GammaVel avatar Jul 19 '22 00:07 GammaVel