Package org.apache.flink.table.sinks
Class CsvTableSink
- java.lang.Object
-
- org.apache.flink.table.sinks.CsvTableSink
-
- All Implemented Interfaces:
AppendStreamTableSink<Row>
,StreamTableSink<Row>
,TableSink<Row>
@Internal @Deprecated public class CsvTableSink extends Object implements AppendStreamTableSink<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, FileSystem.WriteMode writeMode)
Deprecated.A simpleTableSink
to emit data as CSV files.CsvTableSink(String path, String fieldDelim, int numFiles, FileSystem.WriteMode writeMode, String[] fieldNames, 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 TableSink<Row>
configure(String[] fieldNames, TypeInformation<?>[] fieldTypes)
Deprecated.Returns a copy of thisTableSink
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 transformationDataStreamSink
.DataType
getConsumedDataType()
Deprecated.Returns the data type consumed by thisTableSink
.TableSchema
getTableSchema()
Deprecated.Returns the schema of the consumed table.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.table.legacy.sinks.TableSink
getFieldNames, getFieldTypes, getOutputType
-
-
-
-
Constructor Detail
-
CsvTableSink
public CsvTableSink(String path, String fieldDelim, int numFiles, FileSystem.WriteMode writeMode, String[] fieldNames, 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, 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 DataStreamSink<?> consumeDataStream(DataStream<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<Row>
-
configure
public TableSink<Row> configure(String[] fieldNames, TypeInformation<?>[] fieldTypes)
Deprecated.Description copied from interface:TableSink
Returns a copy of thisTableSink
configured with the field names and types of the table to emit.
-
getConsumedDataType
public DataType getConsumedDataType()
Deprecated.Description copied from interface:TableSink
Returns the data type consumed by thisTableSink
.- Specified by:
getConsumedDataType
in interfaceTableSink<Row>
- Returns:
- The data type expected by this
TableSink
.
-
getTableSchema
public TableSchema getTableSchema()
Deprecated.Description copied from interface:TableSink
Returns the schema of the consumed table.- Specified by:
getTableSchema
in interfaceTableSink<Row>
- Returns:
- The
TableSchema
of the consumed table.
-
-