-
-
Save ldenson11/5486b970ff5d5b2b23cb5e7b8b910321 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String sql = "INSERT INTO sinkTopic " | |
+ "SELECT sensor, " | |
+ "TUMBLE_START(ts, INTERVAL '1' MINUTE) as tumbleStart, " | |
+ "TUMBLE_END(ts, INTERVAL '1' MINUTE) as tumbleEnd, " | |
+ "AVG(temp) AS avgTemp " | |
+ "FROM sourceTopic " | |
+ "WHERE sensor IS NOT null " | |
+ "GROUP BY TUMBLE(ts, INTERVAL '1' MINUTE), sensor"; | |
tableEnv.sqlUpdate(sql); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment