Csv format in the dedicated
flink-formats/flink-csv module instead when writing to Kafka.@Deprecated @PublicEvolving public class OldCsv extends org.apache.flink.table.descriptors.FormatDescriptor
Note: This descriptor describes Flink's non-standard CSV table source/sink. In the future, the
descriptor will be replaced by a proper RFC-compliant version. Use the RFC-compliant Csv
format in the dedicated flink-formats/flink-csv module instead when writing to Kafka.
Use the old one for stream/batch filesystem operations for now.
| Constructor and Description |
|---|
OldCsv()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
OldCsv |
commentPrefix(String prefix)
Deprecated.
Sets a prefix to indicate comments, null by default.
|
OldCsv |
deriveSchema()
Deprecated.
Derivation format schema from table's schema is the default behavior now.
So there is no need to explicitly declare to derive schema.
|
OldCsv |
field(String fieldName,
org.apache.flink.table.types.DataType fieldType)
Deprecated.
Adds a format field with the field name and the type information.
|
OldCsv |
field(String fieldName,
String fieldType)
Deprecated.
Adds a format field with the field name and the type string.
|
OldCsv |
field(String fieldName,
org.apache.flink.api.common.typeinfo.TypeInformation<?> fieldType)
Deprecated.
Adds a format field with the field name and the type information.
|
OldCsv |
fieldDelimiter(String delim)
Deprecated.
Sets the field delimiter, "," by default.
|
OldCsv |
ignoreFirstLine()
Deprecated.
Ignore the first line.
|
OldCsv |
ignoreParseErrors()
Deprecated.
Skip records with parse error instead to fail.
|
OldCsv |
lineDelimiter(String delim)
Deprecated.
Sets the line delimiter, "\n" by default.
|
OldCsv |
quoteCharacter(Character quote)
Deprecated.
Sets a quote character for String values, null by default.
|
OldCsv |
schema(org.apache.flink.table.api.TableSchema schema)
Deprecated.
Sets the format schema with field names and the types.
|
protected Map<String,String> |
toFormatProperties()
Deprecated.
|
public OldCsv fieldDelimiter(String delim)
delim - the field delimiterpublic OldCsv lineDelimiter(String delim)
delim - the line delimiterpublic OldCsv schema(org.apache.flink.table.api.TableSchema schema)
This method overwrites existing fields added with [[field()]].
schema - the table schemapublic OldCsv field(String fieldName, org.apache.flink.api.common.typeinfo.TypeInformation<?> fieldType)
fieldName - the field namefieldType - the type information of the fieldpublic OldCsv field(String fieldName, org.apache.flink.table.types.DataType fieldType)
fieldName - the field namefieldType - the type information of the fieldpublic OldCsv field(String fieldName, String fieldType)
NOTE: the fieldType string should follow the type string defined in LogicalTypeParser.
This method also keeps compatible with old type string defined in TypeStringUtils but
will be dropped in future versions as it uses the old type system.
fieldName - the field namefieldType - the type string of the fieldpublic OldCsv quoteCharacter(Character quote)
quote - the quote characterpublic OldCsv commentPrefix(String prefix)
prefix - the prefix to indicate commentspublic OldCsv ignoreFirstLine()
public OldCsv ignoreParseErrors()
@Deprecated public OldCsv deriveSchema()
This allows for defining schema information only once.
The names, types, and fields' order of the format are determined by the table's schema.
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.