I'm using SSB to create a table from a Kafka topic (using kafka timestamp as watermark eventTimestamp) and doing a TUMBLING windows function to aggregate the data evert 5 minutes and push the data to another table (Kafka Topic).
The latest event is always delayed until I push another one.
If SSB query is running, and I push an event into Kafka (topic_1) no data will be pushed to topic_2.
if push another event to topic_1 then the previous message gets pushed to topic_2 and so on.
Here is a stackoverflow issue of someone who had this exact problem, but I'm unable to do the solution in SSB.
Can you help translate this to SSB?
Here is the query:
insert into topic_2
select process_code, window_start, window_end, cast(COUNT(*) as int) as total_events
INTERVAL '5' minute))
GROUP BY process_code, window_start, window_end