You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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")
The text was updated successfully, but these errors were encountered:
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")
The text was updated successfully, but these errors were encountered: