query timeout if i dont put limit in query.
varunajmera0 opened this issue · 2 comments
varunajmera0 commented
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")
bryanyang0528 commented