eyazan opened a new issue, #7301:
URL: https://github.com/apache/hop/issues/7301
### Apache Hop version?
2.18.0
### Java version?
18
### Operating system
Docker
### What happened?
After upgrading from 2.17.0 to 2.18.0, the **CSV Input** transform fails when
using **Get Fields** followed by **Preview**. "Get Fields" emits a large
amount
of log output, and clicking **Preview** throws a `HopValueException`. The
same
file and the same transform configuration work correctly in 2.17.0.
The exception indicates that one of the fields is being assigned an invalid
value type of `None` (literally the string "None"), which `ValueMetaBase`
cannot render:
ERROR: org.apache.hop.core.exception.HopValueException:
id_4_name None<binary-string> : Unknown type None specified.
at
org.apache.hop.core.row.value.ValueMetaBase.getString(ValueMetaBase.java:2211)
at
org.apache.hop.ui.core.dialog.PreviewRowsDialog.getDataForRow(PreviewRowsDialog.java:388)
at
org.apache.hop.ui.core.dialog.PreviewRowsDialog.lambda$getData$7(PreviewRowsDialog.java:339)
at
org.apache.hop.pipeline.transforms.csvinput.CsvInputDialog.preview(CsvInputDialog.java:1041)
at
org.apache.hop.pipeline.transforms.csvinput.CsvInputDialog.lambda$open$2(CsvInputDialog.java:142)
...
at
org.apache.hop.pipeline.transforms.csvinput.CsvInputDialog.open(CsvInputDialog.java:676)
The field named in the error (`id_4_name`) is a column that is empty (no
values) in the sampled rows, which appears to be why "Get Fields" leaves its
type undetermined and assigns `None`.
## Steps to reproduce
1. Create a CSV file where at least one column header exists but the column
has
no values in the sampled rows (i.e. an all-empty column), e.g.
`id_4_name`.
2. Add a **CSV Input** transform and point it at the file.
3. Click **Get Fields**.
4. Click **Preview**.
## Expected behavior
Preview renders the rows; empty/undetermined columns default to `String` (as
in
2.17.0) instead of an invalid `None` type.
## Actual behavior
"Get Fields" logs a large volume of messages, and **Preview** throws
`HopValueException: ... Unknown type None specified` and no preview is shown.
## Additional notes
- This is a regression: the identical file and configuration preview
correctly
in 2.17.0.
- The file is UTF-8 (no BOM), comma-delimited, double-quote enclosure.
- The triggering column is one that is empty across the sampled rows, so the
type detection in "Get Fields" seems to be the root cause.
### Issue Priority
Priority: 3
### Issue Component
Component: Hop Web
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]