public class HiveLookupTableSource extends HiveTableSource implements LookupTableSource
Hive Table source has both lookup and continuous read ability, when it acts as continuous read source it does not have the lookup ability but can be a temporal table just like other stream sources. When it acts as bounded table, it has the lookup ability.
A common user case is use hive table as dimension table and always lookup the latest partition data, in this case, hive table source is a continuous read source but currently we implements it by LookupFunction. Because currently TableSource can not tell the downstream when the latest partition has been read finished. This is a temporarily workaround and will re-implement in the future.
HiveTableSource.HiveContinuousPartitionFetcherContext<T extends Comparable<T>>
LookupTableSource.LookupContext, LookupTableSource.LookupRuntimeProvider
DynamicTableSource.Context, DynamicTableSource.DataStructureConverter
ScanTableSource.ScanContext, ScanTableSource.ScanRuntimeProvider
catalogTable, dynamicFilterPartitionKeys, flinkConf, hiveShim, hiveVersion, jobConf, limit, producedDataType, projectedFields, remainingPartitions, tablePath
Constructor and Description |
---|
HiveLookupTableSource(org.apache.hadoop.mapred.JobConf jobConf,
ReadableConfig flinkConf,
ObjectPath tablePath,
ResolvedCatalogTable catalogTable) |
Modifier and Type | Method and Description |
---|---|
DynamicTableSource |
copy()
Creates a copy of this instance during planning.
|
LookupTableSource.LookupRuntimeProvider |
getLookupRuntimeProvider(LookupTableSource.LookupContext context)
Returns a provider of runtime implementation for reading the data.
|
applyDynamicFiltering, applyLimit, applyPartitions, applyProjection, asSummaryString, getChangelogMode, getDataStream, getJobConf, getScanRuntimeProvider, isStreamingSource, listAcceptedFilterFields, listPartitions, reportStatistics, supportsNestedProjection
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asSummaryString
applyProjection
public HiveLookupTableSource(org.apache.hadoop.mapred.JobConf jobConf, ReadableConfig flinkConf, ObjectPath tablePath, ResolvedCatalogTable catalogTable)
public LookupTableSource.LookupRuntimeProvider getLookupRuntimeProvider(LookupTableSource.LookupContext context)
LookupTableSource
There exist different interfaces for runtime implementation which is why LookupTableSource.LookupRuntimeProvider
serves 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.data
for
more information).
The given LookupTableSource.LookupContext
offers utilities by the planner for creating runtime
implementation with minimal dependencies to internal data structures.
getLookupRuntimeProvider
in interface LookupTableSource
LookupFunctionProvider
,
AsyncLookupFunctionProvider
public DynamicTableSource copy()
DynamicTableSource
copy
in interface DynamicTableSource
copy
in class HiveTableSource
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.