Class 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 by FileSink. It is kept only to support tests for the legacy connector stack.
    A simple TableSink 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 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, org.apache.flink.core.fs.FileSystem.WriteMode writeMode)
      Deprecated.
      A simple TableSink 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 simple TableSink 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 transformation DataStreamSink.
      org.apache.flink.table.types.DataType getConsumedDataType()
      Deprecated.
       
      org.apache.flink.table.legacy.api.TableSchema getTableSchema()
      Deprecated.
       
      • 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,
                            org.apache.flink.core.fs.FileSystem.WriteMode writeMode,
                            String[] fieldNames,
                            org.apache.flink.table.types.DataType[] fieldTypes)
        Deprecated.
        A simple TableSink to emit data as CSV files.
        Parameters:
        path - The output path to write the Table to.
        fieldDelim - The field delimiter
        numFiles - The number of files to write to
        writeMode - 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 simple TableSink to emit data as CSV files.
        Parameters:
        path - The output path to write the Table to.
        fieldDelim - The field delimiter
        numFiles - The number of files to write to
        writeMode - The write mode to specify whether existing files are overwritten or not.
      • CsvTableSink

        public CsvTableSink​(String path)
        Deprecated.
        A simple TableSink 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.
      • CsvTableSink

        public CsvTableSink​(String path,
                            String fieldDelim)
        Deprecated.
        A simple TableSink to emit data as CSV files, with default parallelism and write mode.
        Parameters:
        path - The output path to write the Table to.
        fieldDelim - The field delimiter
    • 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 transformation DataStreamSink. The returned DataStreamSink will be used to set resources for the sink operator.
        Specified by:
        consumeDataStream in interface StreamTableSink<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 interface org.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 interface org.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 interface org.apache.flink.table.legacy.sinks.TableSink<org.apache.flink.types.Row>