KSQL Query to consume after certain time from insertion

Hello All,

I hope this message finds you all well.

I am trying to consume a row from a stream using select query, where as the row has certain properties along with the inserted time as a column. Now, I need to consume the row after 30 mins gap from its inserted time.

I tried using both tables and streams but I noticed that, the select query is applying the conditions at the time of insertion itself and as the condition does not matches at the insertion time, it is not getting consumed. But, my expectation is that, that inserted row has to be consumed after 30 minutes from the isertion time. Could any one suggest me, if it is possible to format a query for this scenario?

The select query for the stream/table that I am trying to use for the same:

insert into my_stream values (1, ‘some data’, ‘some message’, 1625745622700);
//1625745622700 - timestamp in milliseconds at the time of insertion.

select * from my_stream where rowtime > inserted_time_ms + 200000 emit changes;

1 Like

A post was split to a new topic: Pull query not working

This topic was automatically closed after 30 days. New replies are no longer allowed.