Glauber Dantas
05/16/2024, 1:20 AMFOR SYSTEM_TIME AS OF statement on Flink SQL. Error: "Temporal table join currently only supports 'FOR SYSTEM_TIME AS OF' left table's time attribute field".
Table joinedTable = sedona.sqlQuery(
"SELECT i.proc_time, i.customer_id, ca.area_id " +
"FROM Input AS i " +
// FIXME the lookup should be made on Postgres but it's not working using the 'FOR SYSTEM_TIME AS OF' statement
"INNER JOIN CustomerArea FOR SYSTEM_TIME AS OF i.proc_time AS ca ON ca.customer_id = i.customer_id " +
"WHERE ST_Intersects(i.geometry, ST_GeomFromWKB(ca.area_geometry))"
);
Without using that statement, the application runs but the external database is queried once (the referenced table gets traversed only once) and after finishing the query gives no more results (in fact the operator from the JDBC source is shown as `FINISHED`on the Flink Web UI, while other operators are still RUNNING).
I created a discussion on StackOverflow also if this could help others with the same issue.
Have you faced that issue already? Can someone give me any advices on how to solve that?
Flink's version is 1.18.1.Hoang Nguyen
05/16/2024, 3:05 PMGlauber Dantas
05/16/2024, 3:07 PMGlauber Dantas
05/16/2024, 6:35 PMtableEnv.createTemporaryView(...) .
By registering the Kinesis and Postgis both as Table using tableEnv.createTable("my_path", TableDescriptor.forConnector("connector")...), everything work as expected and the Postgis database is pooled respecting the TTL etc.Glauber Dantas
05/17/2024, 1:26 AMHoang Nguyen
05/17/2024, 2:31 AMGlauber Dantas
05/17/2024, 1:21 PMPROCTIME() function.
e.g.
Schema.newBuilder().columnByExpression("proctime", "PROCTIME()")
when defining the Table.Glauber Dantas
05/17/2024, 1:29 PMGlauber Dantas
05/17/2024, 1:51 PMHoang Nguyen
05/17/2024, 2:07 PMGlauber Dantas
05/17/2024, 2:09 PM