public static class FactoryUtil.DefaultDynamicTableContext extends Object implements DynamicTableFactory.Context
DynamicTableFactory.Context.| Constructor and Description |
|---|
DefaultDynamicTableContext(ObjectIdentifier objectIdentifier,
ResolvedCatalogTable catalogTable,
org.apache.flink.configuration.ReadableConfig configuration,
ClassLoader classLoader,
boolean isTemporary) |
| Modifier and Type | Method and Description |
|---|---|
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.getObjectIdentifier in interface DynamicTableFactory.Contextpublic 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 in interface DynamicTableFactory.Contextpublic org.apache.flink.configuration.ReadableConfig getConfiguration()
DynamicTableFactory.ContextgetConfiguration in interface DynamicTableFactory.Contextpublic ClassLoader getClassLoader()
DynamicTableFactory.ContextThe class loader is in particular useful for discovering further (nested) factories.
getClassLoader in interface DynamicTableFactory.Contextpublic boolean isTemporary()
DynamicTableFactory.ContextisTemporary in interface DynamicTableFactory.ContextCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.