T - record type that the format produces or consumes.@PublicEvolving public abstract class TableFormatFactoryBase<T> extends Object implements TableFormatFactory<T>
TableFormatFactorys.| 构造器和说明 |
|---|
TableFormatFactoryBase(String type,
int version,
boolean supportsSchemaDerivation) |
| 限定符和类型 | 方法和说明 |
|---|---|
static TableSchema |
deriveSchema(Map<String,String> properties)
Finds the table schema that can be used for a format schema (without time attributes and
generated columns).
|
Map<String,String> |
requiredContext()
Specifies the context that this factory has been implemented for.
|
protected Map<String,String> |
requiredFormatContext()
Format specific context.
|
protected List<String> |
supportedFormatProperties()
Format specific supported properties.
|
List<String> |
supportedProperties()
List of format property keys that this factory can handle.
|
boolean |
supportsSchemaDerivation()
Flag to indicate if the given format supports deriving information from a schema.
|
public TableFormatFactoryBase(String type, int version, boolean supportsSchemaDerivation)
public final Map<String,String> requiredContext()
TableFactoryTypical properties might be: - connector.type - format.type
Specified property versions allow the framework to provide backwards compatible properties in case of string format changes: - connector.property-version - format.property-version
An empty context means that the factory matches for all requests.
requiredContext 在接口中 TableFactorypublic final boolean supportsSchemaDerivation()
TableFormatFactorysupportsSchemaDerivation 在接口中 TableFormatFactory<T>public final List<String> supportedProperties()
TableFormatFactoryExample format properties might be: - format.line-delimiter - format.ignore-parse-errors - format.fields.#.type - format.fields.#.name
If schema derivation is enabled, the list must include schema properties: - schema.#.name - schema.#.type
Note: All supported format properties must be prefixed with "format.". If schema derivation is enabled, also properties with "schema." prefix can be used.
Use "#" to denote an array of values where "#" represents one or more digits. Property versions like "format.property-version" must not be part of the supported properties.
See also TableFactory.supportedProperties() for more information.
supportedProperties 在接口中 TableFactorysupportedProperties 在接口中 TableFormatFactory<T>protected Map<String,String> requiredFormatContext()
This method can be used if format type and a property version is not enough.
protected List<String> supportedFormatProperties()
This method can be used if schema derivation is not enough.
public static TableSchema deriveSchema(Map<String,String> properties)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.