@PublicEvolving public class SchemaValidator extends Object implements DescriptorValidator
Schema
.Constructor and Description |
---|
SchemaValidator(boolean isStreamEnvironment,
boolean supportsSourceTimestamps,
boolean supportsSourceWatermarks) |
Modifier and Type | Method and Description |
---|---|
static Map<String,String> |
deriveFieldMapping(DescriptorProperties properties,
Optional<TypeInformation<?>> inputType)
Finds a table source field mapping.
|
static Optional<String> |
deriveProctimeAttribute(DescriptorProperties properties)
Finds the proctime attribute if defined.
|
static List<RowtimeAttributeDescriptor> |
deriveRowtimeAttributes(DescriptorProperties properties)
Finds the rowtime attributes if defined.
|
static TableSchema |
deriveTableSinkSchema(DescriptorProperties properties)
Deprecated.
This method combines two separate concepts of table schema and field mapping.
This should be split into two methods once we have support for the corresponding
interfaces (see FLINK-9870).
|
static List<String> |
getSchemaDerivationKeys()
Returns keys for a
TableFormatFactory.supportedProperties() method that are accepted
for schema derivation using deriveFormatFields(DescriptorProperties) . |
void |
validate(DescriptorProperties properties)
Performs basic validation such as completeness tests.
|
public SchemaValidator(boolean isStreamEnvironment, boolean supportsSourceTimestamps, boolean supportsSourceWatermarks)
public void validate(DescriptorProperties properties)
DescriptorValidator
validate
in interface DescriptorValidator
public static List<String> getSchemaDerivationKeys()
TableFormatFactory.supportedProperties()
method that are accepted
for schema derivation using deriveFormatFields(DescriptorProperties)
.public static Optional<String> deriveProctimeAttribute(DescriptorProperties properties)
public static List<RowtimeAttributeDescriptor> deriveRowtimeAttributes(DescriptorProperties properties)
@Deprecated public static TableSchema deriveTableSinkSchema(DescriptorProperties properties)
public static Map<String,String> deriveFieldMapping(DescriptorProperties properties, Optional<TypeInformation<?>> inputType)
properties
- The properties describing a schema.inputType
- The input type that a connector and/or format produces. This parameter can
be used to resolve a rowtime field against an input field.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.