You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Alessandro D'Armiento (Jira)" <ji...@apache.org> on 2020/05/26 08:58:00 UTC

[jira] [Commented] (NIFI-7464) CSVRecordSetWriter does not output header for record sets with zero records

    [ https://issues.apache.org/jira/browse/NIFI-7464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17116547#comment-17116547 ] 

Alessandro D'Armiento commented on NIFI-7464:
---------------------------------------------

This could be made optional with an additional parameter in CSVRecordSetWriter

> 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
>            Priority: Major
>
> 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)