0
votes

How do we window join using SQL client in Flink SQL query. Windowing in the same fashion as mention in link below https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/stream/operators/joining.html

Sample Query that requires windowing SELECT sourceKafka.* FROM sourceKafka INNER JOIN badips ON sourceKafka.source.ip=badips.ip

sourceKafka is source-table, with continuous stream of kafka badips is another source-table

1

1 Answers

1
votes

Here's an example of a time windowed join, using Flink SQL:

SELECT *
FROM Orders o, Shipments s
WHERE o.id = s.orderId AND
  o.ordertime BETWEEN s.shiptime - INTERVAL '4' HOUR AND s.shiptime

See the docs for more details.