Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

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

User_MQKXIMar 3 2022 — edited Mar 4 2022

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)
2022-03-03_17-25.png
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!!

Comments

Post Details

Added on Mar 3 2022
0 comments
910 views