Julien Nioche
Julien Nioche

Reputation: 4864

Generate CSV files with headers

I am generating CSV outputs from tuples. I can't find a way of generating headers in the files. Could anyone confirm whether this is possible or not?

Upvotes: 0

Views: 422

Answers (1)

kkrugler
kkrugler

Reputation: 9255

it might be possible, but I haven't found it. I added a flatmap function upstream that (a) converted the output POJO to a string, and (b) did a one-shot injection of the header row. But there are concerns with state recovery, to ensure it always and only gets written out once.

Upvotes: 1

Related Questions