Hello everyone, Currently, user can correlate temporal table by temporal table join to enrich their fact table, a temporal table can be a changing history table which tracks the changes(e.g. database changelog) or a changing dimensioned table which materializes the changes(e.g. database table). For changing dimensioned table, Flink uses DDL to define a temporal table and visits the temporal table data by looking up the external system’s table. For changing history table, Flink uses temporal table function to define a parameterized view of changing history table and then accesses the data of view, but Temporal Table Function can only be called via Table API or YAML which is pretty inconvenient for FLINK SQL users. If we can support temporal table DDL, user no longer needs temporal table function, and they can visit temporal table easily in pure SQL world.
Flink SQL obtains the ability to interpret changelog after FLIP-95[1], changelog is natural temporal table which contains all versioned data of the the origin database table. Support temporal table on changelog would help user visit specific version of the original database table, this will enrich Flink temporal table join scenario much. The community have already had a related discussion thread[2] and reach some consensus. Based on that, I prepare the FLIP-132[3] to support Temporal Table DDL, please see the FLIP doc for more details. Any comment is welcome, I'm looking forward to your feedback. Best Leonard [1] https://cwiki.apache.org/confluence/display/FLINK/FLIP-95%3A+New+TableSource+and+TableSink+interfaces <https://cwiki.apache.org/confluence/display/FLINK/FLIP-95:+New+TableSource+and+TableSink+interfaces> [2] http://apache-flink-mailing-list-archive.1008284.n3.nabble.com/DISCUSS-FLINK-16824-Creating-Temporal-Table-Function-via-DDL-td40333.html <http://apache-flink-mailing-list-archive.1008284.n3.nabble.com/DISCUSS-FLINK-16824-Creating-Temporal-Table-Function-via-DDL-td40333.html> [3] https://cwiki.apache.org/confluence/display/FLINK/FLIP-132+Temporal+Table+DDL <https://cwiki.apache.org/confluence/display/FLINK/FLIP-132+Temporal+Table+DDL>