1

Receiving below error while execution of CSV file which includes around 400k rows

Error:

ERROR CSV Reader 2:1 Execute failed: Too few data elements (line: 2 (Row0), source: 'file:/Users/shobha.dhingra/Desktop/SBC:Non%20SBC/SBC.csv')

I have tried executing another csv file with few lines, did not face an issue.

James Z
  • 12,209
  • 10
  • 24
  • 44

2 Answers2

5

It is not about the number of lines, but the content in the line (2 in your case). It seems your SBC.csv file is not correct, it has extra header content or the second line misses the commas representing the missing cells.

You can use the CSV Reader node's Support Short Lines option to let KNIME handle this case by producing missing cells.

Gábor Bakos
  • 8,982
  • 52
  • 35
  • 52
  • i am using CSV Reader Node but still execution fails and above was the error. first row contains headers and second row onward data starts from where error has occurred. Could help resolve me same. – Shobha Dhingra May 08 '19 at 11:00
0

I get this error when end-of-line characters exist in a field. You could load the file into a text editor and identify any look for non-printing characters (tabs, carriage returns etc) between your delimiters.

If you can't get a clean version of the file, consider using this regex [^ -~] to identify any character that is not a space or a visible character.

I hope this helps.

bemused
  • 1
  • 1