Hi dtroiano
I try to use your scenario command
- Create raw stream
CREATE STREAM movieratings (title VARCHAR, release_year INT, rating DOUBLE)
WITH (kafka_topic='movieratings',
partitions=1,
value_format='avro');
- exec select window emit final
SELECT title,
COUNT(*) AS rating_count,
WINDOWSTART AS window_start,
WINDOWEND AS window_end, LATEST_BY_OFFSET(rating)
FROM movieratings
WINDOW TUMBLING (SIZE 1 SECONDS)
GROUP BY title
EMIT FINAL;
- select raw stream for compare
select * from movieratings emit changes;
- try to insert into
round 1
INSERT INTO movieratings (title, release_year, rating) VALUES ('Die Hard', 1998, 6.7);
round 2
INSERT INTO movieratings (title, release_year, rating) VALUES ('Die Hard', 1998, 6.7);
INSERT INTO movieratings (title, release_year, rating) VALUES ('Die Hard', 1998, 6.7);
result from
select * from movieratings emit changes;
have 3 row because we insert into 3 row in 2 round
SELECT title,
COUNT(*) AS rating_count,
WINDOWSTART AS window_start,
WINDOWEND AS window_end, LATEST_BY_OFFSET(rating)
FROM movieratings
WINDOW TUMBLING (SIZE 1 SECONDS)
GROUP BY title
EMIT FINAL;
from EMIT FINAL no result of both round
Why no output on emit final?
I use ksqlDB 7.5.0