How to connect from Dataflow to Oracle using TLS and JDBC with a wallet

Problem

Setting up a TLS connection from Dataflow to Oracle directly through configurable pipeline options is currently not supported.

Environment

  • Cloud Dataflow
  • Java SDK 
  • Oracle blog article available explaining how this is done from the Oracle perspective

Solution

  1. Upload the Oracle wallet files by using the --filesToStage option, which will add the files to the workers' class paths.
  2. With that information the JvmInitializer class can be used to set the relevant Java system properties.

Cause

In order to set up a TLS connection, Java system properties need to be configured in accordance with the Oracle blog article to point to wallet files located on worker machines. This is not supported out of the box for Dataflow right now.