The ParserCSV.inc library we're using for CSV parsing does not support batching at the moment. A CSV file can only be parsed in one piece.

As ParserCSV is the only candidate for batching on the parser level in the Feeds suite, this issue is prerequisite for #744660: Expand batch support to fetchers and parsers.

Comments

alex_b’s picture

Status: Active » Needs review
Issue tags: +Needs tests
StatusFileSize
new2.96 KB

Here we go:

- Time based batching (this is what existing infrastructure in Parser CSV allows us to do).
- Make Iterator report file position.
- Make Iterator accept a file position on where to start parsing.

Needs tests. Time based batching will likely need to go in favor of a more testable number-of-lines based batching.

alex_b’s picture

StatusFileSize
new4.18 KB

- Introduces line based batching.

alex_b’s picture

StatusFileSize
new9.85 KB

- Added tests
- Series of bug fixes
- All tests passing

Read test in patch to understand the new functionality.

alex_b’s picture

StatusFileSize
new10.3 KB

- Clean up naming: lastLinePos() instead of lineLimitReached(), setLineLimit() instead of setNumberOfLines().
- Deprecated timeoutReached() in favor of lastLinePos().

alex_b’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)
Issue tags: -Needs tests

Automatically closed -- issue fixed for 2 weeks with no activity.