As a workarounds I have been using a CalculateRecordStats and a
RouteOnAttribute to route files with 0 records and only fix those 0 records
files so it doesn't influence all the correct files

Kind regards
Jens M. Kofoed

Den 19. dec. 2022 kl. 17.40 skrev Joe Witt <joe.w...@gmail.com>:


Josef

Please file a JIRA with this information above. 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.

Thanks

On Mon, Dec 19, 2022 at 9:21 AM <josef.zahn...@swisscom.com> wrote:

> Hi guys
>
>
>
> I’ve pretty basic question. 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). Has anybody another easy approach :-)?
>
>
>
> Cheers Josef
>
>
>
>
>
> <image001.png>
>
>

Reply via email to