Hi Soheil,

I don't think it is a bug the Row class is pretty tightly linked to the
TableAPI. DataSet#writeAsCsv has always only worked with Tuple classes. You
can use DataSet#writeAsText to write arbitrary DataSets to file (will use
toString() methods).

Cheers,

Konstantin

On Sat, Jul 6, 2019 at 3:49 PM Soheil Pourbafrani <soheil.i...@gmail.com>
wrote:

> Hi,
>
> Using the JDBCInputFormat I loaded a DataSet<Row> type. When I tried to
> save it as CSV file it errors:
> java.lang.ClassCastException: org.apache.flink.types.Row cannot be cast to
> org.apache.flink.api.java.tuple.Tuple
>
> That's while I can save it as a text file. Here is the code.
>
> DataSet<Row> dataset = env.createInput(InputFormat);
>
> dataset.writeAsCsv("table_data");
>
> Is it a bug?
>
>

-- 

Konstantin Knauf | Solutions Architect

+49 160 91394525


Planned Absences: 10.08.2019 - 31.08.2019, 05.09. - 06.09.2010


--

Ververica GmbH | Invalidenstrasse 115, 10115 Berlin, Germany

--

Ververica GmbH
Registered at Amtsgericht Charlottenburg: HRB 158244 B
Managing Directors: Dr. Kostas Tzoumas, Dr. Stephan Ewen

Reply via email to