flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From izual <izual...@163.com>
Subject How to write a retract table to Kafka?
Date Wed, 26 Feb 2020 10:52:42 GMT
Hi community:SQL contains aggregate functions, GROUP BY, etc´╝îwill generate a RetractStream,
which type is DataStream[(Boolean, Row)].
It's not allowed to write to Kafka because kafka table is based on AppendStreamTableSink.


If I only need to write ADD message to Kafka, is it possible to achieve this only by SQL?
What is the classical usage for this? 
tableEnv.toRetractStream[Row](...).filter(_._1).map(_._2).addSink(new KafkaProducer)
or
How to convert a RetractStream to a DataStream, then use SQL to output to Kafka?
Mime
View raw message