Import Ignoring the last line of a CSV file

I ran into a weird issue this morning when trying to load some segment files.

Data File Preview returns the 58 rows which I expected.
Data Viewer returns 57 rows which was not expected.

I tried to redirect any error rows to a flat file, but no success, there were no rows being emitted to the flat file.

I checked in the warnings and saw the following:
[File Connection [1]] Warning: There is a partial row at the end of the file.

I double and triple checked that it had all of the columns (or commas) available. They were all there (why wouldn’t it be? Excel makes valid CSV files).

When I tried to add an empty row in (a row with 13 commas) it was attaching it to the last column which seemed very odd to me. However when I gave it some text, it would capture it as a new row (which is the removed because of the last row vanishing).

It turns out that the row delimiter was messed up. It said “_x003C_none_x003E_” instead of the normal “<none>”.

After changing it back to “” it worked as expected. Very weird.

Hopefully this will stop you from scratching your head and wondering why a single row is randomly being removed from the dataset without rhyme / reason.

Leave a Reply