Jonathan Feinberg
06/19/2023, 2:43 PMINSERT INTO sink_table
SELECT
`key`,
`journeyRef`,
MAX(`eventTimestamp`) AS `eventTimestamp`,
SUM(`alightingCount`) AS `totalAlighting`
FROM source_table
GROUP BY `key`, `journeyRef`
I am trying to source from filesystem source connector to filesystem sink connector, and I am getting the error:
pyflink.util.exceptions.TableException: org.apache.flink.table.api.TableException: Table sink 'default_catalog.default_database.accjoin_filesystem' doesn't support consuming update changes which is produced by node GroupAggregate(groupBy=[key, journeyRef], select=[key, journeyRef, MAX(eventTimestamp) AS eventTimestamp, SUM(alightingCount) AS totalAlighting])
However, if I replace the sink with a print connector, it works as expected.
Is this a bug, or am I missing a limitation in how the filesystem connector works?Martijn Visser
06/19/2023, 2:43 PMMartijn Visser
06/19/2023, 2:44 PMJonathan Feinberg
06/19/2023, 2:59 PMMartijn Visser
06/19/2023, 3:04 PMI'm wondering though, wouldn't that also be a problem for the print connector?No, because the print connector can change the output on screen π
Is it fair to assume that bounding the query in a time interval would solve the issue?It depends π E.g. you could have late data, so that would require Flink to still take those situations into account. However, if you would use something like a Window TVF, then I believe your output is an append-only stream. See https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/sql/queries/window-tvf/
Jonathan Feinberg
06/19/2023, 3:22 PM