I have two streaming tables from two Kafka topic and I want to join these streams and perform aggregate function on the data joined.
Streams need to be joined using sliding window. On joining and windowing the data, I am getting an error Rowtime attributes must not be in the input rows of a regular join. As a workaround you can cast the time attributes of input tables to TIMESTAMP before.
Below is code snippet
select cep.payload['id'] , ep.payload['id'] ,
ep.event_flink_time,
ep.rowtime,
TIMESTAMPDIFF(SECOND, ep.event_flink_time, cep.event_flink_time) as timediff,
HOP_START (cep.event_flink_time, INTERVAL '5' MINUTES, INTERVAL '10' MINUTES) as hop_start,
HOP_END (cep.event_flink_time, INTERVAL '5' MINUTES, INTERVAL '10' MINUTES) as hop_end
FROM table1 cep
JOIN table2 ep
ON cep.payload['id'] = ep.payload['id']
group by HOP(cep.event_flink_time, INTERVAL '5' MINUTES, INTERVAL '10' MINUTES), cep.payload, ep.payload, cep.event_flink_time, ep.event_flink_time,
ep.rowtime
I am using AWS Zeppelin notebook and using Flink SQL Table API. For streaming data, how can I join the data using the sliding window function? Or should I use a different type of join for streaming data along with window functions. Here is a ticket for same error: https://issues.apache.org/jira/browse/FLINK-10211