Csv
format in the dedicated flink-formats/flink-csv
module instead when writing to Kafka.@Deprecated @PublicEvolving public class OldCsv extends 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,
DataType fieldType)
Deprecated.
OldCsv supports derive schema from table schema by default, it is no
longer necessary to explicitly declare the format schema. This method will be removed in
the future. |
OldCsv |
field(String fieldName,
String fieldType)
Deprecated.
OldCsv supports derive schema from table schema by default, it is no
longer necessary to explicitly declare the format schema. This method will be removed in
the future. |
OldCsv |
field(String fieldName,
TypeInformation<?> fieldType)
Deprecated.
OldCsv supports derive schema from table schema by default, it is no
longer necessary to explicitly declare the format schema. This method will be removed in
the future. |
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 |
numFiles(int numFiles)
Deprecated.
Set the numFiles.
|
OldCsv |
quoteCharacter(Character quote)
Deprecated.
Sets a quote character for String values, null by default.
|
OldCsv |
schema(TableSchema schema)
Deprecated.
OldCsv supports derive schema from table schema by default, it is no
longer necessary to explicitly declare the format schema. This method will be removed in
the future. |
protected Map<String,String> |
toFormatProperties()
Deprecated.
Converts this descriptor into a set of format properties.
|
OldCsv |
writeMode(String writeMode)
Deprecated.
Set a writeMode.
|
toProperties
toString
public OldCsv fieldDelimiter(String delim)
delim
- the field delimiterpublic OldCsv lineDelimiter(String delim)
delim
- the line delimiter@Deprecated public OldCsv schema(TableSchema schema)
OldCsv
supports derive schema from table schema by default, it is no
longer necessary to explicitly declare the format schema. This method will be removed in
the future.This method overwrites existing fields added with [[field()]].
schema
- the table schema@Deprecated public OldCsv field(String fieldName, TypeInformation<?> fieldType)
OldCsv
supports derive schema from table schema by default, it is no
longer necessary to explicitly declare the format schema. This method will be removed in
the future.fieldName
- the field namefieldType
- the type information of the field@Deprecated public OldCsv field(String fieldName, DataType fieldType)
OldCsv
supports derive schema from table schema by default, it is no
longer necessary to explicitly declare the format schema. This method will be removed in
the future.fieldName
- the field namefieldType
- the type information of the field@Deprecated public OldCsv field(String fieldName, String fieldType)
OldCsv
supports derive schema from table schema by default, it is no
longer necessary to explicitly declare the format schema. This method will be removed in
the future.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()
public OldCsv writeMode(String writeMode)
writeMode
- The write mode decides what happens if a file should be created, but already
exists.public OldCsv numFiles(int numFiles)
numFiles
- The number of files to write to.@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.
protected Map<String,String> toFormatProperties()
FormatDescriptor
FormatDescriptorValidator.FORMAT
.toFormatProperties
in class FormatDescriptor
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.