You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by "Papadopoulos, Konstantinos" <Ko...@IRIworldwide.com> on 2019/02/01 15:04:36 UTC

Add header to a file produced using the writeAsFormattedText method

Hi all,

I am trying to produce a file from a dataset using the writeAsFormattedText method (e.g., data.writeAsFormattedText(filename, writeMode, formatter)).
Is there any easy way to add a header to the file produced?

Thanks in advance,
Konstantinos

Re: Add header to a file produced using the writeAsFormattedText method

Posted by Fabian Hueske <fh...@gmail.com>.
Hi,

I'm not aware of any plans for this.
It might be an interesting feature for the relational APIs but I don't
think it would be added to the DataSet or DataStream API.

Best, Fabian

Am Mo., 4. Feb. 2019 um 15:23 Uhr schrieb Papadopoulos, Konstantinos <
Konstantinos.Papadopoulos@iriworldwide.com>:

> Hi Fabian,
>
>
>
> Do you know if there is any plan Flink core framework to support such
> functionality?
>
>
>
> Best,
>
> Konstantinos
>
>
>
> *From:* Fabian Hueske <fh...@gmail.com>
> *Sent:* Δευτέρα, 4 Φεβρουαρίου 2019 3:49 μμ
> *To:* Papadopoulos, Konstantinos
> <Ko...@IRIworldwide.com>
> *Cc:* user@flink.apache.org
> *Subject:* Re: Add header to a file produced using the
> writeAsFormattedText method
>
>
>
> Hi Konstantinos,
>
>
>
> Writing headers to files is currently not supported by the underlying
> TextOutputFormat.
>
> You can implement a custom OutputFormat by extending TextOutputFormat to
> add this functionality.
>
>
>
> Best, Fabian
>
>
>
> Am Fr., 1. Feb. 2019 um 16:04 Uhr schrieb Papadopoulos, Konstantinos <
> Konstantinos.Papadopoulos@iriworldwide.com>:
>
> Hi all,
>
>
>
> I am trying to produce a file from a dataset using the
> writeAsFormattedText method (e.g., data.writeAsFormattedText(filename,
> writeMode, formatter)).
>
> Is there any easy way to add a header to the file produced?
>
>
>
> Thanks in advance,
>
> Konstantinos
>
>

RE: Add header to a file produced using the writeAsFormattedText method

Posted by "Papadopoulos, Konstantinos" <Ko...@IRIworldwide.com>.
Hi Fabian,

Do you know if there is any plan Flink core framework to support such functionality?

Best,
Konstantinos

From: Fabian Hueske <fh...@gmail.com>
Sent: Δευτέρα, 4 Φεβρουαρίου 2019 3:49 μμ
To: Papadopoulos, Konstantinos <Ko...@IRIworldwide.com>
Cc: user@flink.apache.org
Subject: Re: Add header to a file produced using the writeAsFormattedText method

Hi Konstantinos,

Writing headers to files is currently not supported by the underlying TextOutputFormat.
You can implement a custom OutputFormat by extending TextOutputFormat to add this functionality.

Best, Fabian

Am Fr., 1. Feb. 2019 um 16:04 Uhr schrieb Papadopoulos, Konstantinos <Ko...@iriworldwide.com>>:
Hi all,

I am trying to produce a file from a dataset using the writeAsFormattedText method (e.g., data.writeAsFormattedText(filename, writeMode, formatter)).
Is there any easy way to add a header to the file produced?

Thanks in advance,
Konstantinos

Re: Add header to a file produced using the writeAsFormattedText method

Posted by Fabian Hueske <fh...@gmail.com>.
Hi Konstantinos,

Writing headers to files is currently not supported by the underlying
TextOutputFormat.
You can implement a custom OutputFormat by extending TextOutputFormat to
add this functionality.

Best, Fabian

Am Fr., 1. Feb. 2019 um 16:04 Uhr schrieb Papadopoulos, Konstantinos <
Konstantinos.Papadopoulos@iriworldwide.com>:

> Hi all,
>
>
>
> I am trying to produce a file from a dataset using the
> writeAsFormattedText method (e.g., data.writeAsFormattedText(filename,
> writeMode, formatter)).
>
> Is there any easy way to add a header to the file produced?
>
>
>
> Thanks in advance,
>
> Konstantinos
>