Class Schema
java.lang.Object
org.apache.flink.table.legacy.descriptors.Schema
- All Implemented Interfaces:
Descriptor
Deprecated.
Describes a schema of a table.
Note: Field names are matched by the exact name by default (case sensitive).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.Schemauses the legacy type key (e.g. schema.0.type = LONG) to store type information in prior v1.9. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Adds a field with the field name and the type string.Deprecated.This method will be removed in future versions as it uses the old type system.Deprecated.Adds a field with the field name and the data type.Deprecated.Specifies the origin of the previously defined field.proctime()Deprecated.Specifies the previously defined field as a processing-time attribute.Deprecated.Specifies the previously defined field as an event-time attribute.schema(TableSchema schema) Deprecated.Sets the schema with field names and the types.Deprecated.Converts this descriptor into a set of properties.
-
Field Details
-
SCHEMA
Deprecated.- See Also:
-
SCHEMA_NAME
Deprecated.- See Also:
-
SCHEMA_TYPE
Deprecated.- See Also:
-
SCHEMA_DATA_TYPE
Deprecated.- See Also:
-
SCHEMA_PROCTIME
Deprecated.- See Also:
-
SCHEMA_FROM
Deprecated.- See Also:
-
-
Constructor Details
-
Schema
public Schema()Deprecated.
-
-
Method Details
-
schema
Deprecated.Sets the schema with field names and the types. Required.This method overwrites existing fields added with
field(String, DataType).- Parameters:
schema- the table schema
-
field
Deprecated.Adds a field with the field name and the data type. Required. This method can be called multiple times. The call order of this method defines also the order of the fields in a row.- Parameters:
fieldName- the field namefieldType- the type information of the field
-
field
@Deprecated public Schema field(String fieldName, org.apache.flink.api.common.typeinfo.TypeInformation<?> fieldType) Deprecated.This method will be removed in future versions as it uses the old type system. Please usefield(String, DataType)instead.Adds a field with the field name and the type information. Required. This method can be called multiple times. The call order of this method defines also the order of the fields in a row.- Parameters:
fieldName- the field namefieldType- the type information of the field
-
field
Deprecated.Adds a field with the field name and the type string. Required. This method can be called multiple times. The call order of this method defines also the order of the fields in a row.NOTE: the fieldType string should follow the type string defined in
LogicalTypeParser. This method also keeps compatible with old type string defined inTypeStringUtilsbut will be dropped in future versions as it uses the old type system.- Parameters:
fieldName- the field namefieldType- the type string of the field
-
from
Deprecated.Specifies the origin of the previously defined field. The origin field is defined by a connector or format.E.g. field("myString", Types.STRING).from("CSV_MY_STRING")
Note: Field names are matched by the exact name by default (case sensitive).
-
proctime
Deprecated.Specifies the previously defined field as a processing-time attribute.E.g. field("proctime", Types.SQL_TIMESTAMP).proctime()
-
rowtime
Deprecated.Specifies the previously defined field as an event-time attribute.E.g. field("rowtime", Types.SQL_TIMESTAMP).rowtime(...)
-
toProperties
Deprecated.Converts this descriptor into a set of properties.- Specified by:
toPropertiesin interfaceDescriptor
-
Descriptor.