Github user mattyb149 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2180#discussion_r160451826
--- Diff:
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/AbstractMongoProcessor.java
---
@@ -221,4 +247,12 @@ protected WriteConcern getWriteConcern(final
ProcessContext context) {
}
return writeConcern;
}
+
+ protected void writeBatch(String payload, ProcessContext context,
ProcessSession session) throws UnsupportedEncodingException {
+ FlowFile flowFile = session.create();
+ flowFile = session.importFrom(new
ByteArrayInputStream(payload.getBytes("UTF-8")), flowFile);
--- End diff --
Is the Mongo output always UTF-8? If not you may need a Character Set
property (which you can borrow from any number of existing processors).
---