Forum Stats

  • 3,827,030 Users
  • 2,260,734 Discussions
  • 7,897,148 Comments

Discussions

How can I connect to Amazon RDS for Oracle on Databricks?

User_MQKXI
User_MQKXI Member Posts: 2 Green Ribbon

In Databricks workspace I want to connect to Amazon RDS for Oracle (19c) to read/query the views.

Database workspace, with runtime version 7.3 LTS ML (includes Apache Spark 3.0.1, Scala 2.12)

I uploaded ojdbc10.jar file to the cluster on Databricks and installed it.

The jar file I found here:

https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html


My confusion how to put the pieces together.

When I check the Connection details in SQL Developer, I have:

Username: <my product>

Password: <my password>

Authentication Type (default)


Additionally, I have an URL to Amazon RDS (which I don't use in SQL Developer, might be the right one for Databricks, that's what I don't know):

<some letters>.rds.amazonaws.com, also using port 1521


According to Databricks the code to connect is:


val jdbcDF = spark.read

.format("jdbc")

.option("url", "jdbc:postgresql:dbserver")

.option("dbtable", "schema.tablename")

.option("user", "username")

.option("password", "password")

 .load()


Can anyone help me please to fill in the options?

Thanks much in advance, much appreciated!!