@Internal public final class DynamicSourceUtils extends Object
DynamicTableSource.| Modifier and Type | Method and Description |
|---|---|
static org.apache.flink.table.types.logical.RowType |
createProducedType(org.apache.flink.table.api.TableSchema schema,
org.apache.flink.table.connector.source.DynamicTableSource source)
Returns the
DataType that a source should produce as the input into the runtime. |
static List<String> |
createRequiredMetadataKeys(org.apache.flink.table.api.TableSchema schema,
org.apache.flink.table.connector.source.DynamicTableSource source)
Returns a list of required metadata keys.
|
static boolean |
isSourceChangeEventsDuplicate(org.apache.flink.table.catalog.CatalogTable catalogTable,
org.apache.flink.table.connector.source.DynamicTableSource tableSource,
org.apache.flink.table.api.TableConfig config)
Returns true if the table source produces duplicate change events.
|
static boolean |
isUpsertSource(org.apache.flink.table.catalog.CatalogTable catalogTable,
org.apache.flink.table.connector.source.DynamicTableSource tableSource)
Returns true if the table is an upsert source.
|
static void |
prepareDynamicSource(org.apache.flink.table.catalog.ObjectIdentifier sourceIdentifier,
org.apache.flink.table.catalog.CatalogTable table,
org.apache.flink.table.connector.source.DynamicTableSource source,
boolean isStreamingMode,
org.apache.flink.table.api.TableConfig config)
Prepares the given
DynamicTableSource. |
public static void prepareDynamicSource(org.apache.flink.table.catalog.ObjectIdentifier sourceIdentifier,
org.apache.flink.table.catalog.CatalogTable table,
org.apache.flink.table.connector.source.DynamicTableSource source,
boolean isStreamingMode,
org.apache.flink.table.api.TableConfig config)
DynamicTableSource. It check whether the source is compatible with
the given schema and applies initial parameters.public static List<String> createRequiredMetadataKeys(org.apache.flink.table.api.TableSchema schema, org.apache.flink.table.connector.source.DynamicTableSource source)
SupportsReadingMetadata.listReadableMetadata().
This method assumes that source and schema have been validated via prepareDynamicSource(ObjectIdentifier, CatalogTable, DynamicTableSource, boolean,
TableConfig).
public static org.apache.flink.table.types.logical.RowType createProducedType(org.apache.flink.table.api.TableSchema schema,
org.apache.flink.table.connector.source.DynamicTableSource source)
DataType that a source should produce as the input into the runtime.
The format looks as follows: PHYSICAL COLUMNS + METADATA COLUMNS
Physical columns use the table schema's name. Metadata column use the metadata key as name.
public static boolean isUpsertSource(org.apache.flink.table.catalog.CatalogTable catalogTable,
org.apache.flink.table.connector.source.DynamicTableSource tableSource)
public static boolean isSourceChangeEventsDuplicate(org.apache.flink.table.catalog.CatalogTable catalogTable,
org.apache.flink.table.connector.source.DynamicTableSource tableSource,
org.apache.flink.table.api.TableConfig config)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.