Missing record delimiter "\n", saw EOF instead
Posted: Thu Aug 30, 2018 12:29 pm
Our DataStage parallel job has a Sequential File stage that reads a CSV file.
This is a sample of the file content. Each row ends with LF (Line Feed - hex = 0A), except the last row has no LF.
"Name","Currency","Description"LF
"ABC","USD","ABC Description"LF
"DEF","USD","DEF Description"
This is in Output > Properties:
Options:
First line is column names = True
This is in Output > Format:
Record level:
Final delimiter = end
Field defaults:
Delimiter = comma
Quote = double
When I run the DataStage, it imported all records successfully, but it gives me 2 warnings:
Warning: Missing record delimiter "\n", saw EOF instead
Warning: Import warning at record 81.
Import complete; 82 records imported successfully, 0 rejected.
There are 83 rows in the CSV file, with the 1st row as the column names.
The "Import warning at record ..." is always on the number of rows - 2, for example if the number of rows = 8, the Import warning will be at record 6.
It looks like the problem is because all rows ends with Line Feed, except for the last row (it doesn't end with Line Feed).
I have tried all the other Final delimiter (Record Level), but doesn't work.
Can I fix the warning ?
How can I read a CSV file who has all rows end with Line Feed, except for the last row ?
Thank you.
This is a sample of the file content. Each row ends with LF (Line Feed - hex = 0A), except the last row has no LF.
"Name","Currency","Description"LF
"ABC","USD","ABC Description"LF
"DEF","USD","DEF Description"
This is in Output > Properties:
Options:
First line is column names = True
This is in Output > Format:
Record level:
Final delimiter = end
Field defaults:
Delimiter = comma
Quote = double
When I run the DataStage, it imported all records successfully, but it gives me 2 warnings:
Warning: Missing record delimiter "\n", saw EOF instead
Warning: Import warning at record 81.
Import complete; 82 records imported successfully, 0 rejected.
There are 83 rows in the CSV file, with the 1st row as the column names.
The "Import warning at record ..." is always on the number of rows - 2, for example if the number of rows = 8, the Import warning will be at record 6.
It looks like the problem is because all rows ends with Line Feed, except for the last row (it doesn't end with Line Feed).
I have tried all the other Final delimiter (Record Level), but doesn't work.
Can I fix the warning ?
How can I read a CSV file who has all rows end with Line Feed, except for the last row ?
Thank you.