Ok, I think there is some misunderstanding here. As it is presented in [1] for implementing Custom Source Connector for Table API and SQL:
*"You first need to have a source connector which can be used in Flink’s runtime system (...)* *For complex connectors, you may want to implement the Source interface <https://ci.apache.org/projects/flink/flink-docs-release-1.13/api/java/org/apache/flink/api/connector/source/Source.html> which gives you a lot of control. For simpler use cases, you can use the SourceFunction interface <https://ci.apache.org/projects/flink/flink-docs-release-1.13/api/java/org/apache/flink/streaming/api/functions/source/SourceFunction.html>. There are already a few different implementations of SourceFunction interfaces for common use cases such as the FromElementsFunction <https://ci.apache.org/projects/flink/flink-docs-release-1.13/api/java/org/apache/flink/streaming/api/functions/source/FromElementsFunction.html> class and the RichSourceFunction <https://ci.apache.org/projects/flink/flink-docs-release-1.13/api/java/org/apache/flink/streaming/api/functions/source/RichSourceFunction.html> class.* " The examples in [1] implement a simple Source based on a RichSourceFunction that is later used by TableSource that implements ScanTableSource Interface. Although the LookupTableSource interface is also mentioned there as a valid choice. The Custom TableSource uses source connector that was implement earlier. Basically I would like to use the same approach from [1] and use it with my custom source connector (implemented based on unified Source interface) but with LookupTableSource and not ScanTableSource. In [1] there is no mention about using TableFunction, although the entire post is based on RichSourceFunction connector. [1] https://flink.apache.org/2021/09/07/connector-table-sql-api-part1.html Cheers, Krzysztof pt., 5 lis 2021 o 11:39 Fabian Paul <fabianp...@ververica.com> napisał(a): > I think neither Source nor RichSourceFunction are correct in this case. > You can have a look at the Jdbc lookup source[1][2]. Your function needs to > implement TableFunction. > > Best, > Fabian > > [1] > https://github.com/apache/flink/blob/master/flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/table/JdbcDynamicTableSource.java > [2] > https://github.com/apache/flink/blob/master/flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/table/JdbcRowDataLookupFunction.java >