You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by nragon <nu...@wedotechnologies.com> on 2017/07/12 13:11:32 UTC
StreamTableSource
Hi,
I have two streams coming from kafka which I want to map into table
environment. Because they are not pojo or tuple I will have to map them
using, for instance, Types.ROW_NAMED. Can i use StreamTableSource and call
registerTableSource or should I use the same code inside getDataStream but
calling registerDataStream instead?
Thanks
--
View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/StreamTableSource-tp14209.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.
Re: StreamTableSource
Posted by Fabian Hueske <fh...@gmail.com>.
Hi,
the Table API internally operates on Row. If you ingest other types they
are first converted into Rows.
I would recommend to convert your DataStream<X> into a DataStream<Row>
using a MapFunction and to convert that stream into a Table using
TableEnvironment.fromDataStream().
Best, Fabian
2017-07-12 15:11 GMT+02:00 nragon <nu...@wedotechnologies.com>:
> Hi,
>
> I have two streams coming from kafka which I want to map into table
> environment. Because they are not pojo or tuple I will have to map them
> using, for instance, Types.ROW_NAMED. Can i use StreamTableSource and call
> registerTableSource or should I use the same code inside getDataStream but
> calling registerDataStream instead?
>
> Thanks
>
>
>
> --
> View this message in context: http://apache-flink-user-
> mailing-list-archive.2336050.n4.nabble.com/StreamTableSource-tp14209.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive
> at Nabble.com.
>