Karl Fredrickson created NIFI-7464:
--------------------------------------

             Summary: CSVRecordSetWriter does not output header for record sets 
with zero records
                 Key: NIFI-7464
                 URL: https://issues.apache.org/jira/browse/NIFI-7464
             Project: Apache NiFi
          Issue Type: Bug
    Affects Versions: 1.11.3
            Reporter: Karl Fredrickson


If you configure CSVRecordSetWriter to output a header row, and a processor 
such as QueryRecord or ConvertRecord writes out a flowfile with zero records 
using the CSVRecordSetWriter, the header row will not be included.

This affects QueryRecord and ConvertRecord processors and presumably all other 
processors that can be configured to use CSVRecordWriter.

I suppose this could be intentional behavior but older versions of NiFi like 
1.3 do output a header even when writing a zero record flowfile, and this 
caused some non-trivial issues for us in the process of upgrading from 1.3 to 
1.11.  We fixed this on our NiFi installation by making a small change to the 
WriteCSVResult.java file and then rebuilding the NiFi record serialization 
services NAR.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to