Suppose we define a custom TableSource and TableSink, then how to integrate with SQL Client? Should I need to register the custom TableSource\Sink name like below manually? If not to register manually, how connector type custom1 map\related to custom1TableSource?
StreamTableEnvironment tableEnv = TableEnvironment.getTableEnvironment(env);
TableSource custom1TableSource = new custom1TableSource ( );
tableEnv.registerTableSource("custom1", custom1TableSource);
Then configure the environment file below?
tables:
- name: custom1TableSource
type: Source
update-mode: append
connector:
property-version: 1
type: ***custom1****
The source and sink I declared:
package com.abc;
public static class custom1TableSource implements StreamTableSource<Row>, DefinedRowtimeAttributes, DefinedProctimeAttribute {
package com.abc;
public static class custom1TableSink implements TableSink<Row>, AppendStreamTableSink<Row> {
https://ci.apache.org/projects/flink/flink-docs-release-1.6/dev/table/sqlClient.html#configuration
Update:
After some checking from source Code I found Flink create the sink and source instance by implements StreamTableSinkFactory and the Factory created by the ServiceLoader ,however how to register the sink and source name to the TableSource and TabSink class?