Interface LookupTableSource
-
- All Superinterfaces:
DynamicTableSource
@PublicEvolving public interface LookupTableSource extends DynamicTableSource
ADynamicTableSourcethat looks up rows of an external storage system by one or more keys during runtime.Compared to
ScanTableSource, the source does not have to read the entire table and can lazily fetch individual values from a (possibly continuously changing) external table when necessary.Note: Compared to
ScanTableSource, aLookupTableSourcedoes only support emitting insert-only changes currently (see alsoRowKind). Further abilities are not supported.In the last step, the planner will call
getLookupRuntimeProvider(LookupContext)for obtaining a provider of runtime implementation. The key fields that are required to perform a lookup are derived from a query by the planner and will be provided in the givenLookupTableSource.LookupContext.getKeys(). The values for those key fields are passed during runtime.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceLookupTableSource.LookupContextContext for creating runtime implementation via aLookupTableSource.LookupRuntimeProvider.static interfaceLookupTableSource.LookupRuntimeProviderProvides actual runtime implementation for reading the data.-
Nested classes/interfaces inherited from interface org.apache.flink.table.connector.source.DynamicTableSource
DynamicTableSource.Context, DynamicTableSource.DataStructureConverter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LookupTableSource.LookupRuntimeProvidergetLookupRuntimeProvider(LookupTableSource.LookupContext context)Returns a provider of runtime implementation for reading the data.-
Methods inherited from interface org.apache.flink.table.connector.source.DynamicTableSource
asSummaryString, copy
-
-
-
-
Method Detail
-
getLookupRuntimeProvider
LookupTableSource.LookupRuntimeProvider getLookupRuntimeProvider(LookupTableSource.LookupContext context)
Returns a provider of runtime implementation for reading the data.There exist different interfaces for runtime implementation which is why
LookupTableSource.LookupRuntimeProviderserves as the base interface.Independent of the provider interface, a source implementation can work on either arbitrary objects or internal data structures (see
org.apache.flink.table.datafor more information).The given
LookupTableSource.LookupContextoffers utilities by the planner for creating runtime implementation with minimal dependencies to internal data structures.
-
-