We should provide a 'reset row' method that allows you to effectively reset / cancel the current row write. This should always succeed and should have the effect that the temporary holding area for the current working row is emptied allowing the prior records in the batch to be committed.
What this would allow you to do is to commit the prior rows in your transaction should you get some sort of error in the middle of processing the current row. Right now if you have an error the only solution is to rollback the entire transaction. This could result in you losing a significant number of prior records in a streaming / micro batched use case (or requires you to stage that locally which makes it more complex.
The following python code should work after this is implemented (in a real case it would probably be in an exception handler of course):