JDBC sink for streams API

Posted by Eduardo Winpenny Tejedor on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/JDBC-sink-for-streams-API-tp29356.html

Hi all,

Could someone point me to the current advised way of adding a JDBC sink? 

Online I've seen one can DataStream.writeUsingOutputFormat() however I see the OutputFormatSinkFunction is deprecated. 

I can also see a JDBCSinkFunction (or JDBCUpsertSinkFunction) but that is "package private" so I can't use it myself. JDBCAppendSinkTable makes use of it but that doesn't work with the Streams API...I tried simply copying its code into a class of my own alas the flush method in JDBCOutputFormat is also "package private"...

JDBC does not receive a lot of attention in Fabian's and Vasili's Stream Processing with Apache Flink or in the online documentation - is there a reason for this? Is it bad practice?


Regards,
Eduardo