Receiving below error while execution of CSV file which includes around 4 lac 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. i am not sure why this is happening
Some please suggest
Is it possible that your CSV has one or more rows that do not have the same number of columns as the previous lines?
Check if you file has a header line. If it is then check mark it in the node. Also, see if file could be loaded with File Reader node.
You could try and load it with R’s Readr. If you could post a sample where the error occurs we could have a look.
I had a similar problem where there were some ‘dirty’ CSV files out of a large number of files and they were too large to just ‘edit’ them in Notepad++ (and that also was not a very nice process). I built a workflow using the R package readr, which seems to me more tolerant towards problematic CSV files and gives you some control how to handle mismatching quotes and so on. You might have to toy around with the settings of the read_delim function.
The text file looks a bit challenging. Large lines with various special characters, text with commas, quotation marks and then , as column separator … what could possibly go wrong … but as usually
Readr saves the day … (hopefully)
kn_example_r_readr_string_document.knwf (396.3 KB)
I have checked the header point.
i have saved the same file in XLS form which could upload but in that all rows are not showing.
No all rows have same number of columns
Hmm… well to rephrase, this is exactly what the node thinks the problem is - that you have “too few columns” in a row for what it was expecting.
Turn on “Support Short Lines” in the configuration dialog to have it ignore this problem.
Thanks, this did work
Can you even tell why full data was not uploaded usingXLS format
I would make a small bet that, because you have rows that have irregular column counts, the XLS reader is not forgiving about this and so does not import all of the rows.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.