Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
Description
We use a “ConvertRecord” processor where we convert an AVRO to a CSV. For that CSV output we would like to have the header enabled, so we tried to set “Include Header Line – true” for the Controller Service of the CSVRecordSetWriter. The issue is, if we have zero records, the header doesn’t show up (but it was there of course in the AVRO file). We need to have it as the columns are important for us, even if we have 0 records.
At the moment we solve it with an extra ExecuteScript processor just before the ConvertRecord, there we add always an extra record with the header lines as string. But it feels a bit hacky as the record.count attribute is 1 record too high (due to the fake header record).
Comment from joewitt from users mailinglist: "Makes sense what you're looking for. Just not sure where this 'concern' would live whether it is in the processors themselves or the controller services for the writers."
It seems that I'm not alone with that requirement, at least one other person (Jens M. Kofoed) uses a similar workaround.
Attachments
Attachments
Issue Links
- links to