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

    https://github.com/apache/nifi/pull/2695#discussion_r190653106
  
    --- Diff: 
nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/test/java/org/apache/nifi/processors/hive/TestSelectHiveQL.java
 ---
    @@ -198,6 +200,51 @@ public void testWithSqlException() throws SQLException 
{
             runner.assertAllFlowFilesTransferred(SelectHiveQL.REL_FAILURE, 1);
         }
     
    +    @Test
    +    public void invokeOnTriggerExceptionInPreQieriesNoIncomingFlows()
    +            throws InitializationException, ClassNotFoundException, 
SQLException, IOException {
    +
    +        doOnTrigger(QUERY_WITHOUT_EL, false, CSV,
    +                "select 'no exception' from persons; select exception from 
persons",
    +                null);
    +
    +        runner.assertAllFlowFilesTransferred(SelectHiveQL.REL_FAILURE, 1);
    --- End diff --
    
    >In general the behavior should remain the same whenever possible
    
    Currently, if there is an error in SQL Query - it will go to "failure" 
relationship (even if there are no incoming connections)
    
![image](https://user-images.githubusercontent.com/19496093/40499024-ae42cbec-5f4e-11e8-9ff0-348dd6793b2a.png)
    
![image](https://user-images.githubusercontent.com/19496093/40498559-68c064c2-5f4d-11e8-9a18-88fcb082b18e.png)
    
    So, I follow current error handling strategy. It's just wasn't accurate 
about:
    
    > since we weren't issuing a flow file on failure before
    
    because we do issue FF on failure (on establishing connection it is 
different though, and not impacted by this change).
    
    @mattyb149 , Any word on this?


---

Reply via email to