Github user mattyb149 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2443#discussion_r164561209
  
    --- Diff: 
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/GetMongo.java
 ---
    @@ -89,6 +99,17 @@ public ValidationResult validate(final String subject, 
final String value, final
             .expressionLanguageSupported(true)
             .addValidator(DOCUMENT_VALIDATOR)
             .build();
    +
    +    static final AllowableValue LOC_BODY = new AllowableValue("body", 
"Body");
    +    static final AllowableValue LOC_PARAM = new AllowableValue("param", 
"Query Parameter");
    +    static final PropertyDescriptor QUERY_LOC = new 
PropertyDescriptor.Builder()
    --- End diff --
    
    It's a bummer we need an additional property here to specify where the 
query is coming from; seems to me that's only because you can leave Query blank 
and it means something. In other processors like ExecuteSQL, you either provide 
a Query in the property (and it is used), or you leave it blank and then it is 
expected that the body of the incoming flow file contains the query.
    
    What is the behavior when Query is filled in but the Query Location is 
Body? Will Query Parameter be ignored or should the processor be marked 
invalid? It looks from the doc that it will be ignored, but I wonder if the 
description below should add something like 
    
    > If 'body' is selected, it will come from the flowfile instead of the 
query parameter, whether the query parameter is set or not
    
    That might just be me though, if it seems clear as written then I'm ok


---

Reply via email to