FileSink
. It is kept only to
support tests for the legacy connector stack.@Internal @Deprecated public class CsvTableSink extends Object implements AppendStreamTableSink<Row>
TableSink
to emit data as CSV files.Modifier and Type | Class and Description |
---|---|
static class |
CsvTableSink.CsvFormatter
Deprecated.
Formats a Row into a String with fields separated by the field delimiter.
|
Constructor and Description |
---|
CsvTableSink(String path)
Deprecated.
A simple
TableSink to emit data as CSV files using comma as field delimiter, with
default parallelism and write mode. |
CsvTableSink(String path,
String fieldDelim)
Deprecated.
A simple
TableSink to emit data as CSV files, with default parallelism and write
mode. |
CsvTableSink(String path,
String fieldDelim,
int numFiles,
FileSystem.WriteMode writeMode)
Deprecated.
A simple
TableSink to emit data as CSV files. |
CsvTableSink(String path,
String fieldDelim,
int numFiles,
FileSystem.WriteMode writeMode,
String[] fieldNames,
DataType[] fieldTypes)
Deprecated.
A simple
TableSink to emit data as CSV files. |
Modifier and Type | Method and Description |
---|---|
TableSink<Row> |
configure(String[] fieldNames,
TypeInformation<?>[] fieldTypes)
Deprecated.
Returns a copy of this
TableSink configured with the field names and types of the
table to emit. |
DataStreamSink<?> |
consumeDataStream(DataStream<Row> dataStream)
Deprecated.
Consumes the DataStream and return the sink transformation
DataStreamSink . |
DataType |
getConsumedDataType()
Deprecated.
Returns the data type consumed by this
TableSink . |
TableSchema |
getTableSchema()
Deprecated.
Returns the schema of the consumed table.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFieldNames, getFieldTypes, getOutputType
public CsvTableSink(String path, String fieldDelim, int numFiles, FileSystem.WriteMode writeMode, String[] fieldNames, DataType[] fieldTypes)
TableSink
to emit data as CSV files.path
- The output path to write the Table to.fieldDelim
- The field delimiternumFiles
- The number of files to write towriteMode
- The write mode to specify whether existing files are overwritten or not.fieldNames
- The field names of the table to emit.fieldTypes
- The field types of the table to emit.public CsvTableSink(String path, String fieldDelim, int numFiles, FileSystem.WriteMode writeMode)
TableSink
to emit data as CSV files.path
- The output path to write the Table to.fieldDelim
- The field delimiternumFiles
- The number of files to write towriteMode
- The write mode to specify whether existing files are overwritten or not.public CsvTableSink(String path)
TableSink
to emit data as CSV files using comma as field delimiter, with
default parallelism and write mode.path
- The output path to write the Table to.public DataStreamSink<?> consumeDataStream(DataStream<Row> dataStream)
StreamTableSink
DataStreamSink
. The
returned DataStreamSink
will be used to set resources for the sink operator.consumeDataStream
in interface StreamTableSink<Row>
public TableSink<Row> configure(String[] fieldNames, TypeInformation<?>[] fieldTypes)
TableSink
TableSink
configured with the field names and types of the
table to emit.public DataType getConsumedDataType()
TableSink
TableSink
.getConsumedDataType
in interface TableSink<Row>
TableSink
.public TableSchema getTableSchema()
TableSink
getTableSchema
in interface TableSink<Row>
TableSchema
of the consumed table.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.