Last active
January 9, 2020 22:15
-
-
Save miguno/abce9fe24cbeebac18b2d3cb2a95daf4 to your computer and use it in GitHub Desktop.
ksqlDB example: Continuously aggregating a stream into a table with a push query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Continuously aggregating a stream into a table with a ksqlDB push query. | |
CREATE STREAM locationUpdatesStream ...; | |
CREATE TABLE locationsPerUser AS | |
SELECT username, COUNT(*) | |
FROM locationUpdatesStream | |
GROUP BY username | |
EMIT CHANGES; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment