Skip to content

Instantly share code, notes, and snippets.

@d-smith
Created July 14, 2021 14:55
Show Gist options
  • Save d-smith/9353d12fe1ceeaf40776637331a1caca to your computer and use it in GitHub Desktop.
Save d-smith/9353d12fe1ceeaf40776637331a1caca to your computer and use it in GitHub Desktop.
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