Github user mattyb149 commented on a diff in the pull request:
    --- Diff: 
    @@ -226,6 +242,11 @@ private ObjectWriter getObjectWriter(ObjectMapper 
mapper, String ppSetting) {
         public void onTrigger(final ProcessContext context, final 
ProcessSession session) throws ProcessException {
    +        FlowFile input = session.get();
    +        if (!context.hasIncomingConnection() && 
(context.getProperty(QUERY) == null)) {
    +            throw new RuntimeException("Without an incoming connection, 
the Query property must be set.");
    --- End diff --
    The RuntimeException here and on line 276 should be ProcessException, it's 
a NiFi-specific runtime exception that indicates we realize something went 
wrong but we don't know how to handle any input/output we might have (like 
routing to failure).  Also rather than `context.getProperty(QUERY) == null` 
since there will be a PropertyValue object returned, you should use 


Reply via email to