'Does JDBCIO support Transactions?

I was reading the Javadoc for Apache beam's JDBCIO https://beam.apache.org/releases/javadoc/2.3.0/index.html?org/apache/beam/sdk/io/jdbc/JdbcIO.html

It does not say much about the Transaction support.

I have a Pipeline that process Orders coming from different Partners in a file. At the end of the processing, I need to update related DB tables. I am trying to update Order and Billing table (PostgresDB) at the end of the Dataflow job, and planning to use JdbcIO to update the DB tables directly. Since these tables have referential integrity, where Billing table has "ORDERID" as foreign key, I am looking for ways to update these two tables in a Transaction so that if update fails for any reason, I can roll back the transaction.

I do not see much details in the JdbcIO doc for Transaction support. Also, if you can share your experience in handling this kind of scenario from dataflow job, will be highly appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source