zio-sql
zio-sql copied to clipboard
Implement partial success
Currently, when a SELECT
is executed, if any row contains a null and the user's data model cannot accommodate it, then the whole query will fail. It would be more useful to allow configurability of this behavior: for analytical / data transformation purposes, it's possible the user would wish to ignore null rows.
If stream had an element-level error combinator, that could achieve the same functionality (TODO: push there?).
In our apps, we make this decision at a finer grain level than described here, we make this decision at row+column level, deciding to substitute with a proper default (empty string), a Option.empty
to represent NULL or an error with the interpretation that the database content is invalid.