Created
July 14, 2021 14:55
-
-
Save d-smith/9353d12fe1ceeaf40776637331a1caca to your computer and use it in GitHub Desktop.
This file contains 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
Add the payload as data, e.g. | |
$.data VARCHAR(256000) | |
CREATE OR REPLACE STREAM "DESTINATION_SQL_STREAM" (event_data VARCHAR(256000)); | |
CREATE OR REPLACE PUMP "STREAM_PUMP" AS INSERT INTO "DESTINATION_SQL_STREAM" | |
SELECT STREAM "data" AS "event_data" | |
FROM "SOURCE_SQL_STREAM_001"; | |
-- Uses a 10-second tumbling time window | |
--GROUP BY FLOOR(("SOURCE_SQL_STREAM_001".ROWTIME - TIMESTAMP '1970-01-01 00:00:00') SECOND / 10 TO SECOND); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment