- DataStream Connectors
This connector provides a sink that writes data to a JDBC database.
To use it, add the following dependency to your project (along with your JDBC-driver):
Note that the streaming connectors are currently NOT part of the binary distribution. See how to link with them for cluster execution here.
Created JDBC sink provides at-least-once guarantee.
Effectively exactly-once can be achieved using upsert statements or idempotent updates.
Please refer to the API documentation for more details.
Since 1.13, Flink JDBC sink supports exactly-once mode. The implementation relies on the JDBC driver support of XA standard.
To use it, create a sink using
exactlyOnceSink() method as above and additionally provide:
Please refer to the JdbcXaSinkFunction documentation for more details.