Create Custom Sink for DataSet

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Create Custom Sink for DataSet

Soheil Pourbafrani
Hi, Using the DataStream API I could create a Custom Sink like classRichMySqlSink extends RichSinkFunction<String> and define my desire behavior in inserting data into mysql table. But using the DataSet API I just can find the output method for sinking data and it accept just OutputFormat data type. In addition I don't want to use the Built-in Flink JDBCOutputFormat. 

So is there any way to create my own Sink Class for inserting data into mysql?
Reply | Threaded
Open this post in threaded view
|

Re: Create Custom Sink for DataSet

Dawid Wysakowicz-2

Hi Soheil,

The equivalent of DataStream's SinkFunction in DataSet API is the mentioned OutputFormat. You can implement the OutputFormat.

Best,

Dawid

On 21/04/2019 20:01, Soheil Pourbafrani wrote:
Hi, Using the DataStream API I could create a Custom Sink like classRichMySqlSink extends RichSinkFunction<String> and define my desire behavior in inserting data into mysql table. But using the DataSet API I just can find the output method for sinking data and it accept just OutputFormat data type. In addition I don't want to use the Built-in Flink JDBCOutputFormat. 

So is there any way to create my own Sink Class for inserting data into mysql?

signature.asc (849 bytes) Download Attachment