Github user MikeThomsen commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2180#discussion_r166078811
--- Diff:
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/AbstractMongoProcessor.java
---
@@ -221,4 +264,16 @@ protected WriteConcern getWriteConcern(final
ProcessContext context) {
}
return writeConcern;
}
+
+ protected void writeBatch(String payload, FlowFile parent,
ProcessContext context, ProcessSession session, Map extraAttributes,
Relationship rel) throws UnsupportedEncodingException {
+ String charset = parent != null ?
context.getProperty(CHARSET).evaluateAttributeExpressions(parent).getValue()
+ :
context.getProperty(CHARSET).evaluateAttributeExpressions().getValue();
+
+ FlowFile flowFile = session.create(parent);
--- End diff --
I just threw a ternary operator in there.
---