Jonathan Feinberg
10/09/2023, 12:09 PMCREATE TABLE input_stream (
`proctime` AS PROCTIME(),
`eventtime` TIMESTAMP(3),
`key` INT,
WATERMARK FOR `eventtime` as `eventtime`
)
PARTITIONED BY `key`
WITH ( 'connector' = 'kinesis', 'stream' = '...')
CREATE TABLE large_read_table (
`key` INT,
`annotation` INT,
PRIMARY KEY (`key`) NOT ENFORCED
)
WITH ( 'connector' = 'iceberg', 'warehouse' = '...', ... )
CREATE TABLE output_stream (
`proctime` TIMESTAMP_LTZ(3),
`eventtime` TIMESTAMP(3),
`key` INT
`annotation` INT,
WATERMARK FOR `eventtime` as `eventtime`
)
PARTITIONED BY `key`
WITH ( 'connector' = 'kinesis', 'stream' = '...')
INSERT INTO output_stream live
SELECT
s.`proctime`,
s.`eventtime`,
s.`key`,
t.`annotation`
FROM input_stream s
LEFT JOIN large_read_table t
ON s.`key` = t.`key`
This give me the error:
Table sink '...output_stream' doesn't support consuming update and delete changes which is produced by node Join.
Joining with LEFT JOIN large_read_table FOR SYSTEM_TIME AS OF s.proctime AS t instead, I get the error:
Processing-time temporal join is not supported yet.
Is there a way to make annotation from lookup table work and have a stream at the end?Martijn Visser
10/09/2023, 12:17 PMIs there a way to make annotation from lookup table work and have a stream at the end?You could use the lookup work on event time, so you would have an event time temporal join
Jonathan Feinberg
10/09/2023, 12:23 PMfor SYSTEM_TIME AS OF s.eventtime it should work?Martijn Visser
10/09/2023, 12:23 PMJonathan Feinberg
10/09/2023, 12:24 PMJonathan Feinberg
10/09/2023, 12:43 PMorg.apache.flink.table.api.ValidationException: Event-Time Temporal Table Join requires both primary key and row time attribute in versioned table, but no row time attribute can be found.
I am not quite sure what this error is trying to say. Any pointers?Martijn Visser
10/09/2023, 12:44 PMJonathan Feinberg
10/09/2023, 12:49 PMJonathan Feinberg
10/09/2023, 1:23 PMeventtime) NOT ENFORCED` to both input_ and output_stream, but there don't seem to make any difference.Jonathan Feinberg
10/09/2023, 1:25 PMeventime, key)` pair?Jonathan Feinberg
10/09/2023, 2:05 PMMartijn Visser
10/09/2023, 2:10 PMis it possible that Iceberg doesn't support being a lookup table?Definitely. I don't know if they've built in support for that
Jonathan Feinberg
10/09/2023, 2:15 PMJonathan Feinberg
10/09/2023, 5:04 PM