Project

General

Profile

Bug #2775

DataManager cuts last row off data_table

Added by Chad Burt about 13 years ago. Updated about 12 years ago.

Status:
Resolved
Priority:
Normal
Category:
datamanager
Target version:
Start date:
02/13/2007
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
2775

Description

Had a problem putting this data into a database:
http://data.piscoweb.org/catalog/metacat?action=read&docid=cburt.5.2&qformat=pisco

It looks like the last row,
(2006-02-01,3,10,"test fixtures are fun")
is getting cut off.

I haven't tested a dataset without a header file. I suspect either the header is being counted against it in a loop or there is a < where a <= would be more appropriate.

History

#1 Updated by ben leinfelder about 12 years ago

in the course of testing the datetime support for the datamanager, I came across the code that is causing this.
the last line in the data file is terminated with EOF rather than the recordDelimiter and so it is not being returned as a record (the record delimiter was never found in that last line....).
i switched around the method used for reading the data characters so that it is more natural to return the last record as a record even when there is only the EOF terminating that record.
this is in the org.ecoinformatics.datamanager.database.DelimitedReader class

#2 Updated by ben leinfelder about 12 years ago

tested with chad's dataset and it works.

#3 Updated by Redmine Admin about 7 years ago

Original Bugzilla ID was 2775

Also available in: Atom PDF