Hi,
I am attempting the following:
String sql = "INSERT INTO table3 "
+ "SELECT col1, col2, window_start_time , window_end_time ,
MAX(col3), MAX(col4), MAX(col5) FROM "
+ "(SELECT col1,col2, "
+ "TUMBLE_START(ts, INTERVAL '1' MINUTE) as
window_start_time, "
+ "TUMBLE_END(ts, INTERVAL '1' MINUTE) as window_end_time, "
....
+ "FROM table1"
+ "WHERE...."
+ "GROUP BY TUMBLE(ts, INTERVAL '1' MINUTE), col1, col2"
+ "*UNION *"
+ "SELECT col1, col2, "
+ "TUMBLE_START(ts, INTERVAL '1' MINUTE) as
window_start_time, "
+ "TUMBLE_END(ts, INTERVAL '1' MINUTE) as window_end_time, "
....
+ "FROM table2"
+ "WHERE ..... "
+ "GROUP BY TUMBLE(ts, INTERVAL '1' MINUTE), col1, col2 )
"
+ " window_start_time, window_end_time, col1, col2";
tableEnv.sqlUpdate( sql );
I am using JDBCAppendTableSink.
Exception:
org.apache.flink.table.api.TableException: AppendStreamTableSink requires
that Table has only insert changes.
What in the query should I fix?