StreamTableSource

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

StreamTableSource

nragon
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
Reply | Threaded
Open this post in threaded view
|

Re: StreamTableSource

Fabian Hueske-2
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 <[hidden email]>:
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.