Package org.apache.flink.table.sinks
Class CsvTableSink
- java.lang.Object
-
- org.apache.flink.table.sinks.CsvTableSink
-
- All Implemented Interfaces:
AppendStreamTableSink<org.apache.flink.types.Row>
,StreamTableSink<org.apache.flink.types.Row>
,org.apache.flink.table.legacy.sinks.TableSink<org.apache.flink.types.Row>
@Internal @Deprecated public class CsvTableSink extends Object implements AppendStreamTableSink<org.apache.flink.types.Row>
Deprecated.The legacy CSV connector has been replaced byFileSink
. It is kept only to support tests for the legacy connector stack.A simpleTableSink
to emit data as CSV files.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CsvTableSink.CsvFormatter
Deprecated.Formats a Row into a String with fields separated by the field delimiter.
-
Constructor Summary
Constructors Constructor Description CsvTableSink(String path)
Deprecated.A simpleTableSink
to emit data as CSV files using comma as field delimiter, with default parallelism and write mode.CsvTableSink(String path, String fieldDelim)
Deprecated.A simpleTableSink
to emit data as CSV files, with default parallelism and write mode.CsvTableSink(String path, String fieldDelim, int numFiles, org.apache.flink.core.fs.FileSystem.WriteMode writeMode)
Deprecated.A simpleTableSink
to emit data as CSV files.CsvTableSink(String path, String fieldDelim, int numFiles, org.apache.flink.core.fs.FileSystem.WriteMode writeMode, String[] fieldNames, org.apache.flink.table.types.DataType[] fieldTypes)
Deprecated.A simpleTableSink
to emit data as CSV files.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.apache.flink.table.legacy.sinks.TableSink<org.apache.flink.types.Row>
configure(String[] fieldNames, org.apache.flink.api.common.typeinfo.TypeInformation<?>[] fieldTypes)
Deprecated.org.apache.flink.streaming.api.datastream.DataStreamSink<?>
consumeDataStream(org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.types.Row> dataStream)
Deprecated.Consumes the DataStream and return the sink transformationDataStreamSink
.org.apache.flink.table.types.DataType
getConsumedDataType()
Deprecated.org.apache.flink.table.legacy.api.TableSchema
getTableSchema()
Deprecated.
-
-
-
Constructor Detail
-
CsvTableSink
public CsvTableSink(String path, String fieldDelim, int numFiles, org.apache.flink.core.fs.FileSystem.WriteMode writeMode, String[] fieldNames, org.apache.flink.table.types.DataType[] fieldTypes)
Deprecated.A simpleTableSink
to emit data as CSV files.- Parameters:
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.
-
CsvTableSink
public CsvTableSink(String path, String fieldDelim, int numFiles, org.apache.flink.core.fs.FileSystem.WriteMode writeMode)
Deprecated.A simpleTableSink
to emit data as CSV files.- Parameters:
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.
-
CsvTableSink
public CsvTableSink(String path)
Deprecated.A simpleTableSink
to emit data as CSV files using comma as field delimiter, with default parallelism and write mode.- Parameters:
path
- The output path to write the Table to.
-
-
Method Detail
-
consumeDataStream
public org.apache.flink.streaming.api.datastream.DataStreamSink<?> consumeDataStream(org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.types.Row> dataStream)
Deprecated.Description copied from interface:StreamTableSink
Consumes the DataStream and return the sink transformationDataStreamSink
. The returnedDataStreamSink
will be used to set resources for the sink operator.- Specified by:
consumeDataStream
in interfaceStreamTableSink<org.apache.flink.types.Row>
-
configure
public org.apache.flink.table.legacy.sinks.TableSink<org.apache.flink.types.Row> configure(String[] fieldNames, org.apache.flink.api.common.typeinfo.TypeInformation<?>[] fieldTypes)
Deprecated.- Specified by:
configure
in interfaceorg.apache.flink.table.legacy.sinks.TableSink<org.apache.flink.types.Row>
-
getConsumedDataType
public org.apache.flink.table.types.DataType getConsumedDataType()
Deprecated.- Specified by:
getConsumedDataType
in interfaceorg.apache.flink.table.legacy.sinks.TableSink<org.apache.flink.types.Row>
-
getTableSchema
public org.apache.flink.table.legacy.api.TableSchema getTableSchema()
Deprecated.- Specified by:
getTableSchema
in interfaceorg.apache.flink.table.legacy.sinks.TableSink<org.apache.flink.types.Row>
-
-