IMPORT FROM CSV using column selection can fail if columns are missing in the file
Details
| Detail name | Value |
|---|---|
| Changelog Number | 7481 |
| Type | Bug |
| Status | Resolved |
| Affected Versions | EXASOL 6.0.0, EXASolution 5.0.0, Exasol 6.1.0 |
| Fix Versions | Exasol 6.1.2 |
| Resolution Date | 2019-02-18 |
Problem
When importing from a CSV file using column selection, an error can occur if any column after the last selected column is missing in the file.
How to reproduce
Using the example CSV file (test.csv)
1,2,3,4,5 6,7,8,9
, the statement
IMPORT INTO <table> FROM CSV AT <file-location> FILE 'test.csv' (1..4);
will incorrectly produce the following error.
Error: [42636] ETL-2101: Error while parsing row=1 (starting from 0) [CSV Parser found incorrect number of columns. Expected: [4], found [4] columns in file 'test.csv']
Because the selected columns were found in the CSV file, the IMPORT statement should succeed.