public static interface DynamicTableFactory.Context
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.
|
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.
|
ObjectIdentifier getObjectIdentifier()
Catalog
.ResolvedCatalogTable getCatalogTable()
Catalog
.
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.
ReadableConfig getConfiguration()
ClassLoader getClassLoader()
The class loader is in particular useful for discovering further (nested) factories.
boolean isTemporary()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.