Search in sources :

Example 1 with DynamicTableSinkFactory

use of org.apache.flink.table.factories.DynamicTableSinkFactory in project flink by apache.

the class DynamicTableSinkSpec method getTableSink.

public DynamicTableSink getTableSink(FlinkContext flinkContext) {
    if (tableSink == null) {
        final DynamicTableSinkFactory factory = flinkContext.getModuleManager().getFactory(Module::getTableSinkFactory).orElse(null);
        tableSink = FactoryUtil.createDynamicTableSink(factory, contextResolvedTable.getIdentifier(), contextResolvedTable.getResolvedTable(), loadOptionsFromCatalogTable(contextResolvedTable, flinkContext), flinkContext.getTableConfig().getConfiguration(), flinkContext.getClassLoader(), contextResolvedTable.isTemporary());
        if (sinkAbilities != null) {
            sinkAbilities.forEach(spec -> spec.apply(tableSink));
        }
    }
    return tableSink;
}
Also used : DynamicTableSinkFactory(org.apache.flink.table.factories.DynamicTableSinkFactory)

Aggregations

DynamicTableSinkFactory (org.apache.flink.table.factories.DynamicTableSinkFactory)1