@Internal public static class FactoryUtil.DefaultDynamicTableContext extends Object implements DynamicTableFactory.Context
DynamicTableFactory.Context.| 构造器和说明 |
|---|
DefaultDynamicTableContext(ObjectIdentifier objectIdentifier,
ResolvedCatalogTable catalogTable,
org.apache.flink.configuration.ReadableConfig configuration,
ClassLoader classLoader,
boolean isTemporary) |
| 限定符和类型 | 方法和说明 |
|---|---|
ResolvedCatalogTable |
getCatalogTable()
Returns the resolved table information received from the
Catalog. |
ClassLoader |
getClassLoader()
Returns the class loader of the current session.
|
org.apache.flink.configuration.ReadableConfig |
getConfiguration()
Gives read-only access to the configuration of the current session.
|
ObjectIdentifier |
getObjectIdentifier()
Returns the identifier of the table in the
Catalog. |
boolean |
isTemporary()
Whether the table is temporary.
|
public DefaultDynamicTableContext(ObjectIdentifier objectIdentifier, ResolvedCatalogTable catalogTable, org.apache.flink.configuration.ReadableConfig configuration, ClassLoader classLoader, boolean isTemporary)
public ObjectIdentifier getObjectIdentifier()
DynamicTableFactory.ContextCatalog.public ResolvedCatalogTable getCatalogTable()
DynamicTableFactory.ContextCatalog.
The ResolvedCatalogTable forwards the metadata from the catalog but offers a
validated ResolvedSchema. The original metadata object is available via ResolvedCatalogTable.getOrigin().
In most cases, a factory is interested in the following two characteristics:
// get the physical data type to initialize the connector
context.getCatalogTable().getResolvedSchema().toPhysicalRowDataType()
// get primary key information if the connector supports upserts
context.getCatalogTable().getResolvedSchema().getPrimaryKey()
Other characteristics such as metadata columns or watermarks will be pushed down into
the created DynamicTableSource or DynamicTableSink during planning
depending on the implemented ability interfaces.
getCatalogTable 在接口中 DynamicTableFactory.Contextpublic org.apache.flink.configuration.ReadableConfig getConfiguration()
DynamicTableFactory.ContextgetConfiguration 在接口中 DynamicTableFactory.Contextpublic ClassLoader getClassLoader()
DynamicTableFactory.ContextThe class loader is in particular useful for discovering further (nested) factories.
getClassLoader 在接口中 DynamicTableFactory.Contextpublic boolean isTemporary()
DynamicTableFactory.ContextisTemporary 在接口中 DynamicTableFactory.ContextCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.