Skip to content

Commit

Permalink
Update snaps
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Henneberger <git@danielhenneberger.com>
  • Loading branch information
henneberger committed Aug 29, 2024
1 parent d719afc commit 50b905d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ Inputs: importedevent_2
{
"flinkSql" : [
"CREATE TEMPORARY FUNCTION IF NOT EXISTS `epochmillitotimestamp` AS 'com.datasqrl.time.EpochMilliToTimestamp' LANGUAGE JAVA;",
"CREATE TEMPORARY TABLE `importedevent_1` (\n `_uuid` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `ID` BIGINT,\n `EPOCH_TIMESTAMP` BIGINT,\n `SOME_VALUE` VARCHAR(2147483647) CHARACTER SET `UTF-16LE`,\n `TIMESTAMP` TIMESTAMP(6),\n `event_time` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL,\n PRIMARY KEY (`_uuid`) NOT ENFORCED,\n WATERMARK FOR `event_time` AS (`event_time` - INTERVAL '0.0' SECOND)\n) WITH (\n 'hostname' = 'postgres_log',\n 'password' = '${JDBC_PASSWORD}',\n 'connector' = 'postgres-cdc',\n 'port' = '5432',\n 'slot.name' = 'flink_slot',\n 'database-name' = 'datasqrl',\n 'schema-name' = 'public',\n 'decoding.plugin.name' = 'pgoutput',\n 'table-name' = 'Event',\n 'debezium.slot.drop_on_stop' = 'false',\n 'username' = '${JDBC_USERNAME}'\n);",
"CREATE TEMPORARY TABLE `data_1` (\n `_uuid` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `ID` BIGINT NOT NULL,\n `EPOCH_TIMESTAMP` BIGINT NOT NULL,\n `SOME_VALUE` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `TIMESTAMP` AS EPOCHMILLITOTIMESTAMP(`EPOCH_TIMESTAMP`),\n `event_time` AS EPOCHMILLITOTIMESTAMP(`EPOCH_TIMESTAMP`),\n PRIMARY KEY (`ID`) NOT ENFORCED,\n WATERMARK FOR `TIMESTAMP` AS (`TIMESTAMP` - INTERVAL '0.001' SECOND)\n) WITH (\n 'fields.ID.end' = '9',\n 'number-of-rows' = '10',\n 'connector' = 'datagen',\n 'fields.EPOCH_TIMESTAMP.kind' = 'sequence',\n 'fields.EPOCH_TIMESTAMP.end' = '1719319565000',\n 'fields.EPOCH_TIMESTAMP.start' = '1719318565000',\n 'fields.SOME_VALUE.kind' = 'random',\n 'fields.ID.start' = '0',\n 'fields._uuid.kind' = 'random',\n 'fields.ID.kind' = 'sequence'\n);",
"CREATE TEMPORARY TABLE `importedevent_1` (\n `_uuid` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `ID` BIGINT,\n `EPOCH_TIMESTAMP` BIGINT,\n `SOME_VALUE` VARCHAR(2147483647) CHARACTER SET `UTF-16LE`,\n `TIMESTAMP` TIMESTAMP(6),\n `event_time` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL,\n PRIMARY KEY (`_uuid`) NOT ENFORCED,\n WATERMARK FOR `event_time` AS `event_time` - INTERVAL '0.0' SECOND\n) WITH (\n 'hostname' = 'postgres_log',\n 'password' = '${JDBC_PASSWORD}',\n 'connector' = 'postgres-cdc',\n 'port' = '5432',\n 'slot.name' = 'flink_slot',\n 'database-name' = 'datasqrl',\n 'schema-name' = 'public',\n 'decoding.plugin.name' = 'pgoutput',\n 'table-name' = 'Event',\n 'debezium.slot.drop_on_stop' = 'false',\n 'username' = '${JDBC_USERNAME}'\n);",
"CREATE TEMPORARY TABLE `data_1` (\n `_uuid` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `ID` BIGINT NOT NULL,\n `EPOCH_TIMESTAMP` BIGINT NOT NULL,\n `SOME_VALUE` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `TIMESTAMP` AS EPOCHMILLITOTIMESTAMP(`EPOCH_TIMESTAMP`),\n `event_time` AS EPOCHMILLITOTIMESTAMP(`EPOCH_TIMESTAMP`),\n PRIMARY KEY (`ID`) NOT ENFORCED,\n WATERMARK FOR `TIMESTAMP` AS `TIMESTAMP` - INTERVAL '0.001' SECOND\n) WITH (\n 'fields.ID.end' = '9',\n 'number-of-rows' = '10',\n 'connector' = 'datagen',\n 'fields.EPOCH_TIMESTAMP.kind' = 'sequence',\n 'fields.EPOCH_TIMESTAMP.end' = '1719319565000',\n 'fields.EPOCH_TIMESTAMP.start' = '1719318565000',\n 'fields.SOME_VALUE.kind' = 'random',\n 'fields.ID.start' = '0',\n 'fields._uuid.kind' = 'random',\n 'fields.ID.kind' = 'sequence'\n);",
"CREATE TEMPORARY TABLE `data_2_1` (\n `_uuid` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `ID` BIGINT NOT NULL,\n `EPOCH_TIMESTAMP` BIGINT NOT NULL,\n `SOME_VALUE` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `TIMESTAMP` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL,\n `event_time` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL,\n PRIMARY KEY (`_uuid`) NOT ENFORCED\n) WITH (\n 'password' = '${JDBC_PASSWORD}',\n 'connector' = 'jdbc-sqrl',\n 'driver' = 'org.postgresql.Driver',\n 'table-name' = 'Event',\n 'url' = '${POSTGRES_LOG_JDBC_URL}',\n 'username' = '${JDBC_USERNAME}'\n);",
"CREATE TEMPORARY TABLE `importedevent_2_2` (\n `_uuid` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `ID` BIGINT,\n `EPOCH_TIMESTAMP` BIGINT,\n `SOME_VALUE` VARCHAR(2147483647) CHARACTER SET `UTF-16LE`,\n `TIMESTAMP` TIMESTAMP(6),\n `event_time` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL\n) WITH (\n 'connector' = 'print',\n 'print-identifier' = 'LogImportedEvent'\n);",
"CREATE VIEW `table$1`\nAS\nSELECT *\nFROM `data_1`;",
"CREATE VIEW `table$2`\nAS\nSELECT *\nFROM `importedevent_1`;",
"EXECUTE STATEMENT SET BEGIN\nINSERT INTO `data_2_1`\n(SELECT *\nFROM `table$1`)\n;\nINSERT INTO `importedevent_2_2`\n(SELECT *\nFROM `table$2`)\n;\nEND;"
"EXECUTE STATEMENT SET BEGIN\nINSERT INTO `data_2_1`\n(SELECT *\n FROM `table$1`)\n;\nINSERT INTO `importedevent_2_2`\n (SELECT *\n FROM `table$2`)\n ;\n END;"
],
"connectors" : [
"print",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ Inputs: event_2
{
"flinkSql" : [
"CREATE TEMPORARY FUNCTION IF NOT EXISTS `epochmillitotimestamp` AS 'com.datasqrl.time.EpochMilliToTimestamp' LANGUAGE JAVA;",
"CREATE TEMPORARY TABLE `event_1` (\n `_uuid` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `ID` BIGINT NOT NULL,\n `EPOCH_TIMESTAMP` BIGINT NOT NULL,\n `SOME_VALUE` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `TIMESTAMP` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL,\n `event_time` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL,\n PRIMARY KEY (`_uuid`) NOT ENFORCED,\n WATERMARK FOR `event_time` AS (`event_time` - INTERVAL '0.0' SECOND)\n) WITH (\n 'hostname' = 'postgres_log',\n 'password' = '${JDBC_PASSWORD}',\n 'connector' = 'postgres-cdc',\n 'port' = '5432',\n 'slot.name' = 'flink_slot',\n 'database-name' = 'datasqrl',\n 'schema-name' = 'public',\n 'decoding.plugin.name' = 'pgoutput',\n 'table-name' = 'Event',\n 'debezium.slot.drop_on_stop' = 'false',\n 'username' = '${JDBC_USERNAME}'\n);",
"CREATE TEMPORARY TABLE `data_1` (\n `_uuid` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `ID` BIGINT NOT NULL,\n `EPOCH_TIMESTAMP` BIGINT NOT NULL,\n `SOME_VALUE` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `TIMESTAMP` AS EPOCHMILLITOTIMESTAMP(`EPOCH_TIMESTAMP`),\n PRIMARY KEY (`ID`) NOT ENFORCED,\n WATERMARK FOR `TIMESTAMP` AS (`TIMESTAMP` - INTERVAL '0.001' SECOND)\n) WITH (\n 'fields.ID.end' = '9',\n 'number-of-rows' = '10',\n 'connector' = 'datagen',\n 'fields.EPOCH_TIMESTAMP.kind' = 'sequence',\n 'fields.EPOCH_TIMESTAMP.end' = '1719319565000',\n 'fields.EPOCH_TIMESTAMP.start' = '1719318565000',\n 'fields.SOME_VALUE.kind' = 'random',\n 'fields.ID.start' = '0',\n 'fields._uuid.kind' = 'random',\n 'fields.ID.kind' = 'sequence'\n);",
"CREATE TEMPORARY TABLE `event_1` (\n `_uuid` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `ID` BIGINT NOT NULL,\n `EPOCH_TIMESTAMP` BIGINT NOT NULL,\n `SOME_VALUE` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `TIMESTAMP` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL,\n `event_time` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL,\n PRIMARY KEY (`_uuid`) NOT ENFORCED,\n WATERMARK FOR `event_time` AS `event_time` - INTERVAL '0.0' SECOND\n) WITH (\n 'hostname' = 'postgres_log',\n 'password' = '${JDBC_PASSWORD}',\n 'connector' = 'postgres-cdc',\n 'port' = '5432',\n 'slot.name' = 'flink_slot',\n 'database-name' = 'datasqrl',\n 'schema-name' = 'public',\n 'decoding.plugin.name' = 'pgoutput',\n 'table-name' = 'Event',\n 'debezium.slot.drop_on_stop' = 'false',\n 'username' = '${JDBC_USERNAME}'\n);",
"CREATE TEMPORARY TABLE `data_1` (\n `_uuid` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `ID` BIGINT NOT NULL,\n `EPOCH_TIMESTAMP` BIGINT NOT NULL,\n `SOME_VALUE` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `TIMESTAMP` AS EPOCHMILLITOTIMESTAMP(`EPOCH_TIMESTAMP`),\n PRIMARY KEY (`ID`) NOT ENFORCED,\n WATERMARK FOR `TIMESTAMP` AS `TIMESTAMP` - INTERVAL '0.001' SECOND\n) WITH (\n 'fields.ID.end' = '9',\n 'number-of-rows' = '10',\n 'connector' = 'datagen',\n 'fields.EPOCH_TIMESTAMP.kind' = 'sequence',\n 'fields.EPOCH_TIMESTAMP.end' = '1719319565000',\n 'fields.EPOCH_TIMESTAMP.start' = '1719318565000',\n 'fields.SOME_VALUE.kind' = 'random',\n 'fields.ID.start' = '0',\n 'fields._uuid.kind' = 'random',\n 'fields.ID.kind' = 'sequence'\n);",
"CREATE TEMPORARY TABLE `data_2_1` (\n `_uuid` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `ID` BIGINT NOT NULL,\n `EPOCH_TIMESTAMP` BIGINT NOT NULL,\n `SOME_VALUE` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `TIMESTAMP` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL,\n PRIMARY KEY (`_uuid`) NOT ENFORCED\n) WITH (\n 'password' = '${JDBC_PASSWORD}',\n 'connector' = 'jdbc-sqrl',\n 'driver' = 'org.postgresql.Driver',\n 'table-name' = 'Event',\n 'url' = '${POSTGRES_LOG_JDBC_URL}',\n 'username' = '${JDBC_USERNAME}'\n);",
"CREATE TEMPORARY TABLE `event_2_2` (\n `_uuid` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `ID` BIGINT NOT NULL,\n `EPOCH_TIMESTAMP` BIGINT NOT NULL,\n `SOME_VALUE` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,\n `TIMESTAMP` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL,\n `event_time` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL\n) WITH (\n 'connector' = 'print',\n 'print-identifier' = 'LogEvent'\n);",
"CREATE VIEW `table$1`\nAS\nSELECT *\nFROM `data_1`;",
"CREATE VIEW `table$2`\nAS\nSELECT *\nFROM `event_1`;",
"EXECUTE STATEMENT SET BEGIN\nINSERT INTO `data_2_1`\n(SELECT *\nFROM `table$1`)\n;\nINSERT INTO `event_2_2`\n(SELECT *\nFROM `table$2`)\n;\nEND;"
"EXECUTE STATEMENT SET BEGIN\nINSERT INTO `data_2_1`\n(SELECT *\n FROM `table$1`)\n;\nINSERT INTO `event_2_2`\n (SELECT *\n FROM `table$2`)\n ;\n END;"
],
"connectors" : [
"print",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ LogicalProject(myJson=[$0], json=[toJson('{"x":1}')], _id=[$1], _updated_at=[$2]
},
{
"name" : "Query.MySnowflakeTable-10",
"sql" : "CREATE OR REPLACE VIEW Query.MySnowflakeTable-10(myJson, json, _id, _updated_at)\nAS SELECT PARSE_JSON(myJson) AS myJson, TOJSON('{\"x\":1}') AS json, _id, _updated_at\nFROM myjsontable_1\nORDER BY _updated_at DESC NULLS LAST, _id"
"sql" : "CREATE OR REPLACE VIEW Query.MySnowflakeTable-10(myJson, json, _id, _updated_at)\nAS SELECT PARSE_JSON(myJson) AS myJson, PARSE_JSON('{\"x\":1}') AS json, _id, _updated_at\nFROM myjsontable_1\nORDER BY _updated_at DESC NULLS LAST, _id"
}
]
}
Expand Down Expand Up @@ -483,7 +483,7 @@ LogicalProject(myJson=[$0], json=[toJson('{"x":1}')], _id=[$1], _updated_at=[$2]
"query" : {
"type" : "PagedSnowflakeDbQuery",
"type" : "PagedSnowflakeDbQuery",
"sql" : "SELECT myJson, TOJSON('{\"x\":1}') AS json, _id, _updated_at\nFROM myjsontable_1\nORDER BY _updated_at DESC NULLS LAST, _id",
"sql" : "SELECT myJson, PARSE_JSON('{\"x\":1}') AS json, _id, _updated_at\nFROM myjsontable_1\nORDER BY _updated_at DESC NULLS LAST, _id",
"parameters" : [ ]
}
}
Expand Down

0 comments on commit 50b905d

Please sign in to comment.