Github user pvillard31 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1948#discussion_r124612715
--- Diff:
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/GetMongo.java
---
@@ -99,6 +102,13 @@ public ValidationResult validate(final String subject,
final String value, final
.required(false)
.addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR)
.build();
+ static final PropertyDescriptor RESULTS_PER_FLOWFILE = new
PropertyDescriptor.Builder()
+ .name("results-per-flowfile")
+ .displayName("Results Per FlowFile")
+ .description("How many results to put into a flowfile at once. The
whole body will be treated as a JSON array of results.")
+ .required(false)
+ .addValidator(StandardValidators.INTEGER_VALIDATOR)
--- End diff --
Quick remark, the validator you chose means that 0 is an acceptable value.
It also means that if the user sets this property to 0 (or a negative integer),
one single flow file will be generated with a JSON array containing all the
documents. If that's on purpose, this should be indicated in the description.
If it's not the desired behavior, I would suggest:
``StandardValidators.POSITIVE_INTEGER_VALIDATOR``.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---