frictionlessdata / tableschema-js

A JavaScript library for working with Table Schema.
http://frictionlessdata.io/
MIT License
82 stars 27 forks source link

Option to collect all cast errors for `table.read()` call #112

Open xrysanthos opened 6 years ago

xrysanthos commented 6 years ago

Overview

For now table.read fails with a tableschema.Error on the first cast error. We'd like to have an ability to get all errors from the table.read() call.

Here is an example how it's implemented for tabulator with a force_parse option - https://github.com/frictionlessdata/tabulator-py#force-parse.

We e.g. could use a force_cast option.


From @spilio

It would be really useful if there was a configuration option for the Table.read() method that would allow for non-blocking execution - i.e. that would not stop on the first error but rather return a collection of all errors from the validation of the full stream.

There are scenarios that it is really difficult to have users fix one row at a time, plus it adds up effort and complexity on the integrator's side as the only way to mimic such behavior is through a recursive approach which is inefficient since it involves opening the stream multiple times and start reading from the line after the last failed one.

roll commented 6 years ago

@spilio @anuveyatsu This idea is in the air. And it's implemented for tabulator-py. I've added a task description.