@Internal public final class DynamicSourceUtils extends Object
DynamicTableSource
.Modifier and Type | Method and Description |
---|---|
static RowType |
createProducedType(TableSchema schema,
DynamicTableSource source)
Returns the
DataType that a source should produce as the input into the runtime. |
static List<String> |
createRequiredMetadataKeys(TableSchema schema,
DynamicTableSource source)
Returns a list of required metadata keys.
|
static boolean |
isSourceChangeEventsDuplicate(CatalogTable catalogTable,
DynamicTableSource tableSource,
TableConfig config)
Returns true if the table source produces duplicate change events.
|
static boolean |
isUpsertSource(CatalogTable catalogTable,
DynamicTableSource tableSource)
Returns true if the table is an upsert source.
|
static void |
prepareDynamicSource(ObjectIdentifier sourceIdentifier,
CatalogTable table,
DynamicTableSource source,
boolean isStreamingMode,
TableConfig config)
Prepares the given
DynamicTableSource . |
public static void prepareDynamicSource(ObjectIdentifier sourceIdentifier, CatalogTable table, DynamicTableSource source, boolean isStreamingMode, TableConfig config)
DynamicTableSource
. It check whether the source is compatible with
the given schema and applies initial parameters.public static List<String> createRequiredMetadataKeys(TableSchema schema, DynamicTableSource source)
SupportsReadingMetadata.listReadableMetadata()
.
This method assumes that source and schema have been validated via prepareDynamicSource(ObjectIdentifier, CatalogTable, DynamicTableSource, boolean,
TableConfig)
.
public static RowType createProducedType(TableSchema schema, 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(CatalogTable catalogTable, DynamicTableSource tableSource)
public static boolean isSourceChangeEventsDuplicate(CatalogTable catalogTable, DynamicTableSource tableSource, TableConfig config)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.