|Constructor and Description|
|Modifier and Type||Method and Description|
Returns the resolved table information received from the
Returns the class loader of the current session.
Gives read-only access to the configuration of the current session.
Returns a map of options that can enrich the options of the original
Returns the identifier of the table in the
Whether the table is temporary.
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ObjectIdentifier getObjectIdentifier()
This identifier describes the relationship between the table instance and the
Catalog (if any). However, it doesn't uniquely identify this specific
table configuration. The same table might be stored in different catalogs or, in case of
anonymous tables, this identifier is auto-generated and non-deterministic. Because of
that behaviour, we strongly suggest using this identifier only for printing and logging
purposes, and rely on user input for uniquely identifying a "table instance".
For example, when implementing a Kafka source using consumer groups, the user should
provide the consumer group id manually rather than using this identifier as the consumer
group id, so the offset tracking remains stable even if this table is anonymous, or it's
moved to another
public ResolvedCatalogTable getCatalogTable()
Catalogor persisted plan.
In most cases, a factory is interested in the following 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() // get configuration options context.getCatalogTable().getOptions()
Other characteristics such as metadata columns or watermarks will be pushed down into
DynamicTableSink during planning
depending on the implemented ability interfaces.
During a plan restore, usually the table information persisted in the plan is used to
reconstruct the catalog table. If and only if
is set to
ALL, there might be information from both the plan and a catalog lookup
which requires considering
DynamicTableFactory.Context.getEnrichmentOptions(). It enables to enrich the plan
information with frequently changing options (e.g. connection information or timeouts).
DynamicTableFactory.Context.getCatalogTable()during a plan restore.
Because only the
DynamicTableFactory is able to decide which options are safe
to be forwarded without affecting the original topology, enrichment options are exposed
through this method. In general, it's highly recommended using the
FactoryUtil#createTableFactoryHelper(DynamicTableFactory, Context) to merge the options
and then get the result with
FactoryUtil.TableFactoryHelper.getOptions(). The helper
Since a restored topology is static, an implementer has to ensure that the declared options don't affect fundamental abilities. The planner might not react to changed abilities anymore.
public ReadableConfig getConfiguration()
public ClassLoader getClassLoader()
The class loader is in particular useful for discovering further (nested) factories.
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.