>>>pipeline_explain.txt
=== Customer
ID:          default_catalog.default_database.Customer
Type:        stream
Stage:       flink
Primary key: customerid, lastUpdated
Timestamp:   timestamp
Row count:   ~1e8
---
Schema:
 - customerid: BIGINT NOT NULL
 - email: VARCHAR(2147483647) CHARACTER SET "UTF-16LE" NOT NULL
 - name: VARCHAR(2147483647) CHARACTER SET "UTF-16LE" NOT NULL
 - lastUpdated: BIGINT NOT NULL
 - timestamp: TIMESTAMP_LTZ(3) *ROWTIME* NOT NULL
Inputs:
 - default_catalog.default_database.Customer__base
Annotations:
 - stream-root: Customer
Plan:
LogicalWatermarkAssigner(rowtime=[timestamp], watermark=[-($4, 1:INTERVAL SECOND)])
  LogicalProject(customerid=[$0], email=[$1], name=[$2], lastUpdated=[$3], timestamp=[COALESCE(TO_TIMESTAMP_LTZ($3, 0), 1970-01-01 08:00:00:TIMESTAMP_WITH_LOCAL_TIME_ZONE(3))])
    LogicalTableScan(table=[[default_catalog, default_database, Customer]])
SQL:
CREATE TEMPORARY TABLE `Customer__schema` (
  `customerid` BIGINT NOT NULL,
  `email` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,
  `name` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,
  `lastUpdated` BIGINT NOT NULL
)
WITH (
  'connector' = 'datagen'
);
CREATE TABLE `Customer` (
  `timestamp` AS COALESCE(`TO_TIMESTAMP_LTZ`(`lastUpdated`, 0), CAST(TIMESTAMP '1970-01-01 00:00:00.000' AS TIMESTAMP(3) WITH LOCAL TIME ZONE)),
  PRIMARY KEY (`customerid`, `lastUpdated`) NOT ENFORCED,
  WATERMARK FOR `timestamp` AS `timestamp` - INTERVAL '0.001' SECOND
)
WITH (
  'format' = 'flexible-json',
  'path' = 'file:/mock',
  'source.monitor-interval' = '10 sec',
  'connector' = 'filesystem'
)
LIKE `Customer__schema`
=== CustomerCumulate
ID:          default_catalog.default_database.CustomerCumulate
Type:        stream
Stage:       flink
Primary key: window_start, window_end
Timestamp:   -
Row count:   ~3e7
---
Schema:
 - window_start: TIMESTAMP(3) NOT NULL
 - window_end: TIMESTAMP(3) NOT NULL
 - total: BIGINT NOT NULL
Inputs:
 - default_catalog.default_database.Customer
Annotations:
 - features: STREAM_WINDOW_AGGREGATION (feature)
Plan:
LogicalAggregate(group=[{0, 1}], total=[COUNT()])
  LogicalProject(window_start=[$5], window_end=[$6])
    LogicalTableFunctionScan(invocation=[CUMULATE(TABLE(#0), DESCRIPTOR('timestamp'), 300000:INTERVAL MINUTE, 600000:INTERVAL MINUTE)], rowType=[RecordType(BIGINT customerid, VARCHAR(2147483647) email, VARCHAR(2147483647) name, BIGINT lastUpdated, TIMESTAMP_LTZ(3) *ROWTIME* timestamp, TIMESTAMP(3) window_start, TIMESTAMP(3) window_end, TIMESTAMP_LTZ(3) *ROWTIME* window_time)])
      LogicalProject(customerid=[$0], email=[$1], name=[$2], lastUpdated=[$3], timestamp=[$4])
        LogicalTableScan(table=[[default_catalog, default_database, Customer]])
SQL:
CREATE VIEW `CustomerCumulate` AS  SELECT window_start, window_end, COUNT(customerid) AS total
                  FROM TABLE(CUMULATE(TABLE Customer, DESCRIPTOR(`timestamp`), INTERVAL '5' MINUTES, INTERVAL '10' MINUTES))
                  GROUP BY window_start, window_end;

=== CustomerHop
ID:          default_catalog.default_database.CustomerHop
Type:        stream
Stage:       flink
Primary key: window_start, window_end, window_time
Timestamp:   window_time
Row count:   ~9e7
---
Schema:
 - window_start: TIMESTAMP(3) NOT NULL
 - window_end: TIMESTAMP(3) NOT NULL
 - window_time: TIMESTAMP_LTZ(3) *ROWTIME* NOT NULL
 - total: BIGINT NOT NULL
Inputs:
 - default_catalog.default_database.Customer
Annotations:
 - features: STREAM_WINDOW_AGGREGATION (feature)
Plan:
LogicalAggregate(group=[{0, 1, 2}], total=[COUNT()])
  LogicalProject(window_start=[$5], window_end=[$6], window_time=[$7])
    LogicalTableFunctionScan(invocation=[HOP(TABLE(#0), DESCRIPTOR('timestamp'), 300000:INTERVAL MINUTE, 600000:INTERVAL MINUTE)], rowType=[RecordType(BIGINT customerid, VARCHAR(2147483647) email, VARCHAR(2147483647) name, BIGINT lastUpdated, TIMESTAMP_LTZ(3) *ROWTIME* timestamp, TIMESTAMP(3) window_start, TIMESTAMP(3) window_end, TIMESTAMP_LTZ(3) *ROWTIME* window_time)])
      LogicalProject(customerid=[$0], email=[$1], name=[$2], lastUpdated=[$3], timestamp=[$4])
        LogicalTableScan(table=[[default_catalog, default_database, Customer]])
SQL:
CREATE VIEW `CustomerHop` AS  SELECT window_start, window_end, window_time, COUNT(customerid) AS total
                  FROM TABLE(HOP(TABLE Customer, DESCRIPTOR(`timestamp`), INTERVAL '5' MINUTES, INTERVAL '10' MINUTES))
                  GROUP BY window_start, window_end, window_time;

=== CustomerSession
ID:          default_catalog.default_database.CustomerSession
Type:        stream
Stage:       flink
Primary key: window_start, window_end, window_time, customerid
Timestamp:   window_time
Row count:   ~7e7
---
Schema:
 - customerid: BIGINT NOT NULL
 - window_start: TIMESTAMP(3) NOT NULL
 - window_end: TIMESTAMP(3) NOT NULL
 - window_time: TIMESTAMP_LTZ(3) *ROWTIME* NOT NULL
 - total: BIGINT NOT NULL
Inputs:
 - default_catalog.default_database.Customer
Annotations:
 - features: STREAM_WINDOW_AGGREGATION (feature)
 - stream-root: Customer
Plan:
LogicalProject(customerid=[$3], window_start=[$0], window_end=[$1], window_time=[$2], total=[$4])
  LogicalAggregate(group=[{0, 1, 2, 3}], total=[COUNT()])
    LogicalProject(window_start=[$5], window_end=[$6], window_time=[$7], customerid=[$0])
      LogicalTableFunctionScan(invocation=[SESSION(TABLE(#0) PARTITION BY($0), DESCRIPTOR('timestamp'), 600000:INTERVAL MINUTE)], rowType=[RecordType(BIGINT customerid, VARCHAR(2147483647) email, VARCHAR(2147483647) name, BIGINT lastUpdated, TIMESTAMP_LTZ(3) *ROWTIME* timestamp, TIMESTAMP(3) window_start, TIMESTAMP(3) window_end, TIMESTAMP_LTZ(3) *ROWTIME* window_time)])
        LogicalProject(customerid=[$0], email=[$1], name=[$2], lastUpdated=[$3], timestamp=[$4])
          LogicalTableScan(table=[[default_catalog, default_database, Customer]])
SQL:
CREATE VIEW `CustomerSession` AS  SELECT customerid, window_start, window_end, window_time, COUNT(customerid) AS total
                  FROM TABLE(SESSION(TABLE Customer PARTITION BY customerid, DESCRIPTOR(`timestamp`), INTERVAL '10' MINUTES))
                  GROUP BY window_start, window_end, window_time, customerid;

=== CustomerTumble
ID:          default_catalog.default_database.CustomerTumble
Type:        stream
Stage:       flink
Primary key: window_start, window_end
Timestamp:   -
Row count:   ~3e7
---
Schema:
 - window_start: TIMESTAMP(3) NOT NULL
 - window_end: TIMESTAMP(3) NOT NULL
 - total: BIGINT NOT NULL
Inputs:
 - default_catalog.default_database.Customer
Annotations:
 - features: STREAM_WINDOW_AGGREGATION (feature)
Plan:
LogicalAggregate(group=[{0, 1}], total=[COUNT()])
  LogicalProject(window_start=[$5], window_end=[$6])
    LogicalTableFunctionScan(invocation=[TUMBLE(TABLE(#0), DESCRIPTOR('timestamp'), 600000:INTERVAL MINUTE)], rowType=[RecordType(BIGINT customerid, VARCHAR(2147483647) email, VARCHAR(2147483647) name, BIGINT lastUpdated, TIMESTAMP_LTZ(3) *ROWTIME* timestamp, TIMESTAMP(3) window_start, TIMESTAMP(3) window_end, TIMESTAMP_LTZ(3) *ROWTIME* window_time)])
      LogicalProject(customerid=[$0], email=[$1], name=[$2], lastUpdated=[$3], timestamp=[$4])
        LogicalTableScan(table=[[default_catalog, default_database, Customer]])
SQL:
CREATE VIEW `CustomerTumble` AS  SELECT window_start, window_end, COUNT(customerid) AS total
                FROM TABLE(TUMBLE(TABLE Customer, DESCRIPTOR(`timestamp`), INTERVAL '10' MINUTES))
                GROUP BY window_start, window_end;

=== StreamJoin
ID:          default_catalog.default_database.StreamJoin
Type:        stream
Stage:       flink
Primary key: window_start, window_end, window_time, window_start0, window_end0, customerid
Timestamp:   window_time
Row count:   ~1e8
---
Schema:
 - window_start: TIMESTAMP(3) NOT NULL
 - window_end: TIMESTAMP(3) NOT NULL
 - window_time: TIMESTAMP_LTZ(3) *ROWTIME* NOT NULL
 - total: BIGINT NOT NULL
 - customerid: BIGINT NOT NULL
 - window_start0: TIMESTAMP(3) NOT NULL
 - window_end0: TIMESTAMP(3) NOT NULL
 - window_time0: TIMESTAMP_LTZ(3) *ROWTIME* NOT NULL
 - total0: BIGINT NOT NULL
Inputs:
 - default_catalog.default_database.CustomerHop
 - default_catalog.default_database.CustomerSession
Plan:
LogicalProject(window_start=[$0], window_end=[$1], window_time=[$2], total=[$3], customerid=[$4], window_start0=[$5], window_end0=[$6], window_time0=[$7], total0=[$8])
  LogicalJoin(condition=[=($7, $2)], joinType=[inner])
    LogicalTableScan(table=[[default_catalog, default_database, CustomerHop]])
    LogicalTableScan(table=[[default_catalog, default_database, CustomerSession]])
SQL:
CREATE VIEW `StreamJoin` AS  SELECT * FROM CustomerHop h INNER JOIN CustomerSession s ON s.window_time = h.window_time;

>>>flink-sql-no-functions.sql
CREATE TEMPORARY TABLE `Customer__schema` (
  `customerid` BIGINT NOT NULL,
  `email` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,
  `name` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,
  `lastUpdated` BIGINT NOT NULL
)
WITH (
  'connector' = 'datagen'
);
CREATE TABLE `Customer` (
  `timestamp` AS COALESCE(`TO_TIMESTAMP_LTZ`(`lastUpdated`, 0), TIMESTAMP '1970-01-01 00:00:00.000'),
  PRIMARY KEY (`customerid`, `lastUpdated`) NOT ENFORCED,
  WATERMARK FOR `timestamp` AS `timestamp` - INTERVAL '0.001' SECOND
)
WITH (
  'format' = 'flexible-json',
  'path' = 'file:/mock',
  'source.monitor-interval' = '10 sec',
  'connector' = 'filesystem'
)
LIKE `Customer__schema`;
CREATE VIEW `CustomerTumble`
AS
SELECT `window_start`, `window_end`, COUNT(`customerid`) AS `total`
FROM TABLE(TUMBLE(TABLE `Customer`, DESCRIPTOR(`timestamp`), INTERVAL '10' MINUTE))
GROUP BY `window_start`, `window_end`;
CREATE VIEW `CustomerHop`
AS
SELECT `window_start`, `window_end`, `window_time`, COUNT(`customerid`) AS `total`
FROM TABLE(HOP(TABLE `Customer`, DESCRIPTOR(`timestamp`), INTERVAL '5' MINUTE, INTERVAL '10' MINUTE))
GROUP BY `window_start`, `window_end`, `window_time`;
CREATE VIEW `CustomerCumulate`
AS
SELECT `window_start`, `window_end`, COUNT(`customerid`) AS `total`
FROM TABLE(`CUMULATE`(TABLE `Customer`, DESCRIPTOR(`timestamp`), INTERVAL '5' MINUTE, INTERVAL '10' MINUTE))
GROUP BY `window_start`, `window_end`;
CREATE VIEW `CustomerSession`
AS
SELECT `customerid`, `window_start`, `window_end`, `window_time`, COUNT(`customerid`) AS `total`
FROM TABLE(SESSION(TABLE `Customer` PARTITION BY `customerid`, DESCRIPTOR(`timestamp`), INTERVAL '10' MINUTE))
GROUP BY `window_start`, `window_end`, `window_time`, `customerid`;
CREATE VIEW `StreamJoin`
AS
SELECT *
FROM `CustomerHop` AS `h`
 INNER JOIN `CustomerSession` AS `s` ON `s`.`window_time` = `h`.`window_time`;
CREATE TABLE `Customer_1` (
  `customerid` BIGINT NOT NULL,
  `email` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,
  `name` VARCHAR(2147483647) CHARACTER SET `UTF-16LE` NOT NULL,
  `lastUpdated` BIGINT NOT NULL,
  `timestamp` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL,
  PRIMARY KEY (`customerid`, `lastUpdated`) NOT ENFORCED
)
WITH (
  'connector' = 'jdbc-sqrl',
  'driver' = 'org.postgresql.Driver',
  'password' = '${POSTGRES_PASSWORD}',
  'sink.on-conflict.action' = 'IGNORE',
  'table-name' = 'Customer_1',
  'url' = 'jdbc:postgresql://${POSTGRES_AUTHORITY}',
  'username' = '${POSTGRES_USERNAME}'
);
CREATE TABLE `CustomerCumulate_2` (
  `window_start` TIMESTAMP(3) NOT NULL,
  `window_end` TIMESTAMP(3) NOT NULL,
  `total` BIGINT NOT NULL,
  PRIMARY KEY (`window_start`, `window_end`) NOT ENFORCED
)
WITH (
  'connector' = 'jdbc-sqrl',
  'driver' = 'org.postgresql.Driver',
  'password' = '${POSTGRES_PASSWORD}',
  'sink.on-conflict.action' = 'IGNORE',
  'table-name' = 'CustomerCumulate_2',
  'url' = 'jdbc:postgresql://${POSTGRES_AUTHORITY}',
  'username' = '${POSTGRES_USERNAME}'
);
CREATE TABLE `CustomerHop_3` (
  `window_start` TIMESTAMP(3) NOT NULL,
  `window_end` TIMESTAMP(3) NOT NULL,
  `window_time` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL,
  `total` BIGINT NOT NULL,
  PRIMARY KEY (`window_start`, `window_end`, `window_time`) NOT ENFORCED
)
WITH (
  'connector' = 'jdbc-sqrl',
  'driver' = 'org.postgresql.Driver',
  'password' = '${POSTGRES_PASSWORD}',
  'sink.on-conflict.action' = 'IGNORE',
  'table-name' = 'CustomerHop_3',
  'url' = 'jdbc:postgresql://${POSTGRES_AUTHORITY}',
  'username' = '${POSTGRES_USERNAME}'
);
CREATE TABLE `CustomerSession_4` (
  `customerid` BIGINT NOT NULL,
  `window_start` TIMESTAMP(3) NOT NULL,
  `window_end` TIMESTAMP(3) NOT NULL,
  `window_time` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL,
  `total` BIGINT NOT NULL,
  PRIMARY KEY (`window_start`, `window_end`, `window_time`, `customerid`) NOT ENFORCED
)
WITH (
  'connector' = 'jdbc-sqrl',
  'driver' = 'org.postgresql.Driver',
  'password' = '${POSTGRES_PASSWORD}',
  'sink.on-conflict.action' = 'IGNORE',
  'table-name' = 'CustomerSession_4',
  'url' = 'jdbc:postgresql://${POSTGRES_AUTHORITY}',
  'username' = '${POSTGRES_USERNAME}'
);
CREATE TABLE `CustomerTumble_5` (
  `window_start` TIMESTAMP(3) NOT NULL,
  `window_end` TIMESTAMP(3) NOT NULL,
  `total` BIGINT NOT NULL,
  PRIMARY KEY (`window_start`, `window_end`) NOT ENFORCED
)
WITH (
  'connector' = 'jdbc-sqrl',
  'driver' = 'org.postgresql.Driver',
  'password' = '${POSTGRES_PASSWORD}',
  'sink.on-conflict.action' = 'IGNORE',
  'table-name' = 'CustomerTumble_5',
  'url' = 'jdbc:postgresql://${POSTGRES_AUTHORITY}',
  'username' = '${POSTGRES_USERNAME}'
);
CREATE TABLE `StreamJoin_6` (
  `window_start` TIMESTAMP(3) NOT NULL,
  `window_end` TIMESTAMP(3) NOT NULL,
  `window_time` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL,
  `total` BIGINT NOT NULL,
  `customerid` BIGINT NOT NULL,
  `window_start0` TIMESTAMP(3) NOT NULL,
  `window_end0` TIMESTAMP(3) NOT NULL,
  `window_time0` TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL,
  `total0` BIGINT NOT NULL,
  PRIMARY KEY (`window_start`, `window_end`, `window_time`, `window_start0`, `window_end0`, `customerid`) NOT ENFORCED
)
WITH (
  'connector' = 'jdbc-sqrl',
  'driver' = 'org.postgresql.Driver',
  'password' = '${POSTGRES_PASSWORD}',
  'sink.on-conflict.action' = 'IGNORE',
  'table-name' = 'StreamJoin_6',
  'url' = 'jdbc:postgresql://${POSTGRES_AUTHORITY}',
  'username' = '${POSTGRES_USERNAME}'
);
EXECUTE STATEMENT SET BEGIN
INSERT INTO `default_catalog`.`default_database`.`Customer_1`
SELECT *
 FROM `default_catalog`.`default_database`.`Customer`
;
INSERT INTO `default_catalog`.`default_database`.`CustomerCumulate_2`
 SELECT *
  FROM `default_catalog`.`default_database`.`CustomerCumulate`
 ;
 INSERT INTO `default_catalog`.`default_database`.`CustomerHop_3`
  SELECT *
   FROM `default_catalog`.`default_database`.`CustomerHop`
  ;
  INSERT INTO `default_catalog`.`default_database`.`CustomerSession_4`
   SELECT *
    FROM `default_catalog`.`default_database`.`CustomerSession`
   ;
   INSERT INTO `default_catalog`.`default_database`.`CustomerTumble_5`
    SELECT *
     FROM `default_catalog`.`default_database`.`CustomerTumble`
    ;
    INSERT INTO `default_catalog`.`default_database`.`StreamJoin_6`
     SELECT `window_start`, `window_end`, `window_time`, `total`, `customerid`, `window_start0`, `window_end0`, CAST(`window_time0` AS TIMESTAMP(3) WITH LOCAL TIME ZONE) AS `window_time0`, `total0`
      FROM `default_catalog`.`default_database`.`StreamJoin`
     ;
     END
>>>kafka.json
{
  "topics" : [ ],
  "testRunnerTopics" : [ ]
}
>>>postgres.json
{
  "statements" : [
    {
      "name" : "Customer_1",
      "type" : "TABLE",
      "sql" : "CREATE TABLE IF NOT EXISTS \"Customer_1\" (\"customerid\" BIGINT NOT NULL, \"email\" TEXT NOT NULL, \"name\" TEXT NOT NULL, \"lastUpdated\" BIGINT NOT NULL, \"timestamp\" TIMESTAMP WITH TIME ZONE NOT NULL, PRIMARY KEY (\"customerid\",\"lastUpdated\"))",
      "fields" : [
        {
          "name" : "customerid",
          "type" : "BIGINT",
          "nullable" : false
        },
        {
          "name" : "email",
          "type" : "TEXT",
          "nullable" : false
        },
        {
          "name" : "name",
          "type" : "TEXT",
          "nullable" : false
        },
        {
          "name" : "lastUpdated",
          "type" : "BIGINT",
          "nullable" : false
        },
        {
          "name" : "timestamp",
          "type" : "TIMESTAMP WITH TIME ZONE",
          "nullable" : false
        }
      ],
      "primaryKey" : [
        "customerid",
        "lastUpdated"
      ],
      "partitionKey" : [ ],
      "partitionType" : "NONE",
      "numPartitions" : 0,
      "ttl" : 0.0
    },
    {
      "name" : "CustomerCumulate_2",
      "type" : "TABLE",
      "sql" : "CREATE TABLE IF NOT EXISTS \"CustomerCumulate_2\" (\"window_start\" TIMESTAMP WITHOUT TIME ZONE NOT NULL, \"window_end\" TIMESTAMP WITHOUT TIME ZONE NOT NULL, \"total\" BIGINT NOT NULL, PRIMARY KEY (\"window_start\",\"window_end\"))",
      "fields" : [
        {
          "name" : "window_start",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_end",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "total",
          "type" : "BIGINT",
          "nullable" : false
        }
      ],
      "primaryKey" : [
        "window_start",
        "window_end"
      ],
      "partitionKey" : [ ],
      "partitionType" : "NONE",
      "numPartitions" : 0,
      "ttl" : 0.0
    },
    {
      "name" : "CustomerHop_3",
      "type" : "TABLE",
      "sql" : "CREATE TABLE IF NOT EXISTS \"CustomerHop_3\" (\"window_start\" TIMESTAMP WITHOUT TIME ZONE NOT NULL, \"window_end\" TIMESTAMP WITHOUT TIME ZONE NOT NULL, \"window_time\" TIMESTAMP WITH TIME ZONE NOT NULL, \"total\" BIGINT NOT NULL, PRIMARY KEY (\"window_start\",\"window_end\",\"window_time\"))",
      "fields" : [
        {
          "name" : "window_start",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_end",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_time",
          "type" : "TIMESTAMP WITH TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "total",
          "type" : "BIGINT",
          "nullable" : false
        }
      ],
      "primaryKey" : [
        "window_start",
        "window_end",
        "window_time"
      ],
      "partitionKey" : [ ],
      "partitionType" : "NONE",
      "numPartitions" : 0,
      "ttl" : 0.0
    },
    {
      "name" : "CustomerSession_4",
      "type" : "TABLE",
      "sql" : "CREATE TABLE IF NOT EXISTS \"CustomerSession_4\" (\"customerid\" BIGINT NOT NULL, \"window_start\" TIMESTAMP WITHOUT TIME ZONE NOT NULL, \"window_end\" TIMESTAMP WITHOUT TIME ZONE NOT NULL, \"window_time\" TIMESTAMP WITH TIME ZONE NOT NULL, \"total\" BIGINT NOT NULL, PRIMARY KEY (\"window_start\",\"window_end\",\"window_time\",\"customerid\"))",
      "fields" : [
        {
          "name" : "customerid",
          "type" : "BIGINT",
          "nullable" : false
        },
        {
          "name" : "window_start",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_end",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_time",
          "type" : "TIMESTAMP WITH TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "total",
          "type" : "BIGINT",
          "nullable" : false
        }
      ],
      "primaryKey" : [
        "window_start",
        "window_end",
        "window_time",
        "customerid"
      ],
      "partitionKey" : [ ],
      "partitionType" : "NONE",
      "numPartitions" : 0,
      "ttl" : 0.0
    },
    {
      "name" : "CustomerTumble_5",
      "type" : "TABLE",
      "sql" : "CREATE TABLE IF NOT EXISTS \"CustomerTumble_5\" (\"window_start\" TIMESTAMP WITHOUT TIME ZONE NOT NULL, \"window_end\" TIMESTAMP WITHOUT TIME ZONE NOT NULL, \"total\" BIGINT NOT NULL, PRIMARY KEY (\"window_start\",\"window_end\"))",
      "fields" : [
        {
          "name" : "window_start",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_end",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "total",
          "type" : "BIGINT",
          "nullable" : false
        }
      ],
      "primaryKey" : [
        "window_start",
        "window_end"
      ],
      "partitionKey" : [ ],
      "partitionType" : "NONE",
      "numPartitions" : 0,
      "ttl" : 0.0
    },
    {
      "name" : "StreamJoin_6",
      "type" : "TABLE",
      "sql" : "CREATE TABLE IF NOT EXISTS \"StreamJoin_6\" (\"window_start\" TIMESTAMP WITHOUT TIME ZONE NOT NULL, \"window_end\" TIMESTAMP WITHOUT TIME ZONE NOT NULL, \"window_time\" TIMESTAMP WITH TIME ZONE NOT NULL, \"total\" BIGINT NOT NULL, \"customerid\" BIGINT NOT NULL, \"window_start0\" TIMESTAMP WITHOUT TIME ZONE NOT NULL, \"window_end0\" TIMESTAMP WITHOUT TIME ZONE NOT NULL, \"window_time0\" TIMESTAMP WITH TIME ZONE NOT NULL, \"total0\" BIGINT NOT NULL, PRIMARY KEY (\"window_start\",\"window_end\",\"window_time\",\"window_start0\",\"window_end0\",\"customerid\"))",
      "fields" : [
        {
          "name" : "window_start",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_end",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_time",
          "type" : "TIMESTAMP WITH TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "total",
          "type" : "BIGINT",
          "nullable" : false
        },
        {
          "name" : "customerid",
          "type" : "BIGINT",
          "nullable" : false
        },
        {
          "name" : "window_start0",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_end0",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_time0",
          "type" : "TIMESTAMP WITH TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "total0",
          "type" : "BIGINT",
          "nullable" : false
        }
      ],
      "primaryKey" : [
        "window_start",
        "window_end",
        "window_time",
        "window_start0",
        "window_end0",
        "customerid"
      ],
      "partitionKey" : [ ],
      "partitionType" : "NONE",
      "numPartitions" : 0,
      "ttl" : 0.0
    },
    {
      "name" : "Customer",
      "type" : "VIEW",
      "sql" : "CREATE OR REPLACE VIEW \"Customer\"(\"customerid\", \"email\", \"name\", \"lastUpdated\", \"timestamp\") AS SELECT *\nFROM \"Customer_1\"",
      "fields" : [
        {
          "name" : "customerid",
          "type" : "BIGINT",
          "nullable" : false
        },
        {
          "name" : "email",
          "type" : "TEXT",
          "nullable" : false
        },
        {
          "name" : "name",
          "type" : "TEXT",
          "nullable" : false
        },
        {
          "name" : "lastUpdated",
          "type" : "BIGINT",
          "nullable" : false
        },
        {
          "name" : "timestamp",
          "type" : "TIMESTAMP WITH TIME ZONE",
          "nullable" : false
        }
      ]
    },
    {
      "name" : "CustomerCumulate",
      "type" : "VIEW",
      "sql" : "CREATE OR REPLACE VIEW \"CustomerCumulate\"(\"window_start\", \"window_end\", \"total\") AS SELECT *\nFROM \"CustomerCumulate_2\"",
      "fields" : [
        {
          "name" : "window_start",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_end",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "total",
          "type" : "BIGINT",
          "nullable" : false
        }
      ]
    },
    {
      "name" : "CustomerHop",
      "type" : "VIEW",
      "sql" : "CREATE OR REPLACE VIEW \"CustomerHop\"(\"window_start\", \"window_end\", \"window_time\", \"total\") AS SELECT *\nFROM \"CustomerHop_3\"",
      "fields" : [
        {
          "name" : "window_start",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_end",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_time",
          "type" : "TIMESTAMP WITH TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "total",
          "type" : "BIGINT",
          "nullable" : false
        }
      ]
    },
    {
      "name" : "CustomerSession",
      "type" : "VIEW",
      "sql" : "CREATE OR REPLACE VIEW \"CustomerSession\"(\"customerid\", \"window_start\", \"window_end\", \"window_time\", \"total\") AS SELECT *\nFROM \"CustomerSession_4\"",
      "fields" : [
        {
          "name" : "customerid",
          "type" : "BIGINT",
          "nullable" : false
        },
        {
          "name" : "window_start",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_end",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_time",
          "type" : "TIMESTAMP WITH TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "total",
          "type" : "BIGINT",
          "nullable" : false
        }
      ]
    },
    {
      "name" : "CustomerTumble",
      "type" : "VIEW",
      "sql" : "CREATE OR REPLACE VIEW \"CustomerTumble\"(\"window_start\", \"window_end\", \"total\") AS SELECT *\nFROM \"CustomerTumble_5\"",
      "fields" : [
        {
          "name" : "window_start",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_end",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "total",
          "type" : "BIGINT",
          "nullable" : false
        }
      ]
    },
    {
      "name" : "StreamJoin",
      "type" : "VIEW",
      "sql" : "CREATE OR REPLACE VIEW \"StreamJoin\"(\"window_start\", \"window_end\", \"window_time\", \"total\", \"customerid\", \"window_start0\", \"window_end0\", \"window_time0\", \"total0\") AS SELECT *\nFROM \"StreamJoin_6\"",
      "fields" : [
        {
          "name" : "window_start",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_end",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_time",
          "type" : "TIMESTAMP WITH TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "total",
          "type" : "BIGINT",
          "nullable" : false
        },
        {
          "name" : "customerid",
          "type" : "BIGINT",
          "nullable" : false
        },
        {
          "name" : "window_start0",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_end0",
          "type" : "TIMESTAMP WITHOUT TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "window_time0",
          "type" : "TIMESTAMP WITH TIME ZONE",
          "nullable" : false
        },
        {
          "name" : "total0",
          "type" : "BIGINT",
          "nullable" : false
        }
      ]
    }
  ]
}
>>>vertx.json
{
  "models" : {
    "v1" : {
      "queries" : [
        {
          "type" : "args",
          "parentType" : "Query",
          "fieldName" : "Customer",
          "exec" : {
            "arguments" : [
              {
                "type" : "variable",
                "path" : "limit"
              },
              {
                "type" : "variable",
                "path" : "offset"
              }
            ],
            "query" : {
              "type" : "SqlQuery",
              "sql" : "SELECT *\nFROM \"Customer_1\"",
              "parameters" : [ ],
              "pagination" : "LIMIT_AND_OFFSET",
              "cacheDurationMs" : 0,
              "database" : "POSTGRES"
            }
          }
        },
        {
          "type" : "args",
          "parentType" : "Query",
          "fieldName" : "CustomerCumulate",
          "exec" : {
            "arguments" : [
              {
                "type" : "variable",
                "path" : "limit"
              },
              {
                "type" : "variable",
                "path" : "offset"
              }
            ],
            "query" : {
              "type" : "SqlQuery",
              "sql" : "SELECT *\nFROM \"CustomerCumulate_2\"",
              "parameters" : [ ],
              "pagination" : "LIMIT_AND_OFFSET",
              "cacheDurationMs" : 0,
              "database" : "POSTGRES"
            }
          }
        },
        {
          "type" : "args",
          "parentType" : "Query",
          "fieldName" : "CustomerHop",
          "exec" : {
            "arguments" : [
              {
                "type" : "variable",
                "path" : "limit"
              },
              {
                "type" : "variable",
                "path" : "offset"
              }
            ],
            "query" : {
              "type" : "SqlQuery",
              "sql" : "SELECT *\nFROM \"CustomerHop_3\"",
              "parameters" : [ ],
              "pagination" : "LIMIT_AND_OFFSET",
              "cacheDurationMs" : 0,
              "database" : "POSTGRES"
            }
          }
        },
        {
          "type" : "args",
          "parentType" : "Query",
          "fieldName" : "CustomerSession",
          "exec" : {
            "arguments" : [
              {
                "type" : "variable",
                "path" : "limit"
              },
              {
                "type" : "variable",
                "path" : "offset"
              }
            ],
            "query" : {
              "type" : "SqlQuery",
              "sql" : "SELECT *\nFROM \"CustomerSession_4\"",
              "parameters" : [ ],
              "pagination" : "LIMIT_AND_OFFSET",
              "cacheDurationMs" : 0,
              "database" : "POSTGRES"
            }
          }
        },
        {
          "type" : "args",
          "parentType" : "Query",
          "fieldName" : "CustomerTumble",
          "exec" : {
            "arguments" : [
              {
                "type" : "variable",
                "path" : "limit"
              },
              {
                "type" : "variable",
                "path" : "offset"
              }
            ],
            "query" : {
              "type" : "SqlQuery",
              "sql" : "SELECT *\nFROM \"CustomerTumble_5\"",
              "parameters" : [ ],
              "pagination" : "LIMIT_AND_OFFSET",
              "cacheDurationMs" : 0,
              "database" : "POSTGRES"
            }
          }
        },
        {
          "type" : "args",
          "parentType" : "Query",
          "fieldName" : "StreamJoin",
          "exec" : {
            "arguments" : [
              {
                "type" : "variable",
                "path" : "limit"
              },
              {
                "type" : "variable",
                "path" : "offset"
              }
            ],
            "query" : {
              "type" : "SqlQuery",
              "sql" : "SELECT *\nFROM \"StreamJoin_6\"",
              "parameters" : [ ],
              "pagination" : "LIMIT_AND_OFFSET",
              "cacheDurationMs" : 0,
              "database" : "POSTGRES"
            }
          }
        }
      ],
      "mutations" : [ ],
      "subscriptions" : [ ],
      "operations" : [
        {
          "function" : {
            "name" : "GetCustomer",
            "parameters" : {
              "type" : "object",
              "properties" : {
                "offset" : {
                  "type" : "integer"
                },
                "limit" : {
                  "type" : "integer"
                }
              },
              "required" : [ ]
            }
          },
          "format" : "JSON",
          "apiQuery" : {
            "query" : "query Customer($limit: Int = 10, $offset: Int = 0) {\nCustomer(limit: $limit, offset: $offset) {\ncustomerid\nemail\nname\nlastUpdated\ntimestamp\n}\n\n}",
            "queryName" : "Customer",
            "operationType" : "QUERY"
          },
          "mcpMethod" : "TOOL",
          "restMethod" : "GET",
          "uriTemplate" : "queries/Customer{?offset,limit}"
        },
        {
          "function" : {
            "name" : "GetCustomerCumulate",
            "parameters" : {
              "type" : "object",
              "properties" : {
                "offset" : {
                  "type" : "integer"
                },
                "limit" : {
                  "type" : "integer"
                }
              },
              "required" : [ ]
            }
          },
          "format" : "JSON",
          "apiQuery" : {
            "query" : "query CustomerCumulate($limit: Int = 10, $offset: Int = 0) {\nCustomerCumulate(limit: $limit, offset: $offset) {\nwindow_start\nwindow_end\ntotal\n}\n\n}",
            "queryName" : "CustomerCumulate",
            "operationType" : "QUERY"
          },
          "mcpMethod" : "TOOL",
          "restMethod" : "GET",
          "uriTemplate" : "queries/CustomerCumulate{?offset,limit}"
        },
        {
          "function" : {
            "name" : "GetCustomerHop",
            "parameters" : {
              "type" : "object",
              "properties" : {
                "offset" : {
                  "type" : "integer"
                },
                "limit" : {
                  "type" : "integer"
                }
              },
              "required" : [ ]
            }
          },
          "format" : "JSON",
          "apiQuery" : {
            "query" : "query CustomerHop($limit: Int = 10, $offset: Int = 0) {\nCustomerHop(limit: $limit, offset: $offset) {\nwindow_start\nwindow_end\nwindow_time\ntotal\n}\n\n}",
            "queryName" : "CustomerHop",
            "operationType" : "QUERY"
          },
          "mcpMethod" : "TOOL",
          "restMethod" : "GET",
          "uriTemplate" : "queries/CustomerHop{?offset,limit}"
        },
        {
          "function" : {
            "name" : "GetCustomerSession",
            "parameters" : {
              "type" : "object",
              "properties" : {
                "offset" : {
                  "type" : "integer"
                },
                "limit" : {
                  "type" : "integer"
                }
              },
              "required" : [ ]
            }
          },
          "format" : "JSON",
          "apiQuery" : {
            "query" : "query CustomerSession($limit: Int = 10, $offset: Int = 0) {\nCustomerSession(limit: $limit, offset: $offset) {\ncustomerid\nwindow_start\nwindow_end\nwindow_time\ntotal\n}\n\n}",
            "queryName" : "CustomerSession",
            "operationType" : "QUERY"
          },
          "mcpMethod" : "TOOL",
          "restMethod" : "GET",
          "uriTemplate" : "queries/CustomerSession{?offset,limit}"
        },
        {
          "function" : {
            "name" : "GetCustomerTumble",
            "parameters" : {
              "type" : "object",
              "properties" : {
                "offset" : {
                  "type" : "integer"
                },
                "limit" : {
                  "type" : "integer"
                }
              },
              "required" : [ ]
            }
          },
          "format" : "JSON",
          "apiQuery" : {
            "query" : "query CustomerTumble($limit: Int = 10, $offset: Int = 0) {\nCustomerTumble(limit: $limit, offset: $offset) {\nwindow_start\nwindow_end\ntotal\n}\n\n}",
            "queryName" : "CustomerTumble",
            "operationType" : "QUERY"
          },
          "mcpMethod" : "TOOL",
          "restMethod" : "GET",
          "uriTemplate" : "queries/CustomerTumble{?offset,limit}"
        },
        {
          "function" : {
            "name" : "GetStreamJoin",
            "parameters" : {
              "type" : "object",
              "properties" : {
                "offset" : {
                  "type" : "integer"
                },
                "limit" : {
                  "type" : "integer"
                }
              },
              "required" : [ ]
            }
          },
          "format" : "JSON",
          "apiQuery" : {
            "query" : "query StreamJoin($limit: Int = 10, $offset: Int = 0) {\nStreamJoin(limit: $limit, offset: $offset) {\nwindow_start\nwindow_end\nwindow_time\ntotal\ncustomerid\nwindow_start0\nwindow_end0\nwindow_time0\ntotal0\n}\n\n}",
            "queryName" : "StreamJoin",
            "operationType" : "QUERY"
          },
          "mcpMethod" : "TOOL",
          "restMethod" : "GET",
          "uriTemplate" : "queries/StreamJoin{?offset,limit}"
        }
      ],
      "schema" : {
        "type" : "string",
        "schema" : "type Customer {\n  customerid: Long!\n  email: String!\n  name: String!\n  lastUpdated: Long!\n  timestamp: DateTime!\n}\n\ntype CustomerCumulate {\n  window_start: DateTime!\n  window_end: DateTime!\n  total: Long!\n}\n\ntype CustomerHop {\n  window_start: DateTime!\n  window_end: DateTime!\n  window_time: DateTime!\n  total: Long!\n}\n\ntype CustomerSession {\n  customerid: Long!\n  window_start: DateTime!\n  window_end: DateTime!\n  window_time: DateTime!\n  total: Long!\n}\n\ntype CustomerTumble {\n  window_start: DateTime!\n  window_end: DateTime!\n  total: Long!\n}\n\n\"An RFC-3339 compliant Full Date Scalar\"\nscalar Date\n\n\"A DateTime scalar that handles both full RFC3339 and shorter timestamp formats\"\nscalar DateTime\n\n\"A JSON scalar\"\nscalar JSON\n\n\"24-hour clock time value string in the format `hh:mm:ss` or `hh:mm:ss.sss`.\"\nscalar LocalTime\n\n\"A 64-bit signed integer\"\nscalar Long\n\ntype Query {\n  Customer(limit: Int = 10, offset: Int = 0): [Customer!]\n  CustomerCumulate(limit: Int = 10, offset: Int = 0): [CustomerCumulate!]\n  CustomerHop(limit: Int = 10, offset: Int = 0): [CustomerHop!]\n  CustomerSession(limit: Int = 10, offset: Int = 0): [CustomerSession!]\n  CustomerTumble(limit: Int = 10, offset: Int = 0): [CustomerTumble!]\n  StreamJoin(limit: Int = 10, offset: Int = 0): [StreamJoin!]\n}\n\ntype StreamJoin {\n  window_start: DateTime!\n  window_end: DateTime!\n  window_time: DateTime!\n  total: Long!\n  customerid: Long!\n  window_start0: DateTime!\n  window_end0: DateTime!\n  window_time0: DateTime!\n  total0: Long!\n}\n\nenum _McpMethodType {\n  NONE\n  TOOL\n  RESOURCE\n}\n\nenum _RestMethodType {\n  NONE\n  GET\n  POST\n}\n\ndirective @api(mcp: _McpMethodType, rest: _RestMethodType, uri: String) on QUERY | MUTATION | FIELD_DEFINITION\n"
      }
    }
  }
}
