How can we get continues data from stream
client = KSQLAPI('http://127.0.0.1:8088')
streamProperties = {"ksql.streams.auto.offset.reset": "earliest"}
def cal():
def events():
query_string="select * from trend_news_stream emit changes;"
q = client.query(query_string, stream_properties=streamProperties, idle_timeout=10)
for c in q:
yield c
return Response(events(), mimetype="text/event-stream")
How can we get continues data from stream client = KSQLAPI('http://127.0.0.1:8088') streamProperties = {"ksql.streams.auto.offset.reset": "earliest"} def cal(): def events(): query_string="select * from trend_news_stream emit changes;" q = client.query(query_string, stream_properties=streamProperties, idle_timeout=10) for c in q: yield c return Response(events(), mimetype="text/event-stream")