You will recognize the problem if:
- The data is NOT imported into the target table
- Error similar to "data contains 25 columns, expected 26" is observed
There are inconsistent data columns in the CSV file being imported. In this occasion, while the CSV file was expected to contain rows of 26 data columns, some rows in the file were 25.
Validate the CSV file being imported to ensure that there are consistent columns within the CSV file.
- Remove the extra columns in the file
- Alternatively, add the expected columns to the incomplete rows
|Note: Ensure that the inconsistent CSV file is removed from the Data Source and the amended one is added after the changes are made|
As a workaround, you may create the below system property to skip the non parseable row and load the correct rows.
Type: true | false
Description: If any row in a CSV file is non parseable for whatever reason, skip loading of that row and move on to the next one.
This will ignore the row that has a mismatch in column numbers and move on to the next row instead of stopping the load then and there.