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;
}
Aggregations