diff --git a/lib/writer.js b/lib/writer.js index 0f50aa3d..0c2f2c83 100644 --- a/lib/writer.js +++ b/lib/writer.js @@ -265,15 +265,15 @@ class ParquetTransformer extends stream.Transform { _transform(row, encoding, callback) { if (row) { this.writer.appendRow(row) - .then(callback) - .catch(e => callback(e)); + .then(d => callback(null,d), callback); } else { callback(); } } _flush(callback) { - this.writer.close(callback); + this.writer.close(callback) + .then(d => callback(null, d), callback); } }