- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 07:16 AM
I am aware, I can load anything into a DataFrame using JDBC, that works well from Oracle sources. Is there an equivalent in Spark SQL, so I can combine datasets as well?
Basically something like so - you get the idea...
select
lt.field1,
rt.field2
from localTable lt
join remoteTable@serverLink rt
on rt.id = lt.id
Thanks
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 08:00 AM
dblink does not exist. What you can do is create two table statements with jdbc sources and then do a join of the two tables. It will be a little more to write, but you'll get the correct table in the end.
In python you can maybe do it easier with something like:
spark.read.jdbc(config1).join(spark.read.jdbc(config2), "key", "type")

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 08:00 AM
dblink does not exist. What you can do is create two table statements with jdbc sources and then do a join of the two tables. It will be a little more to write, but you'll get the correct table in the end.
In python you can maybe do it easier with something like:
spark.read.jdbc(config1).join(spark.read.jdbc(config2), "key", "type")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 11:36 PM
Here are the methods you can leverage to establish Databricks Connect to Oracle Database seamlessly:
- Method 1: Using Hevo Data for Databricks Connect to Oracle Database
- Method 2: Manual Steps for Databricks Connect to Oracle Database
Check this link:
https://hevodata.com/learn/databricks-connect-to-oracle-database/#7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2023 12:35 AM
Thanks everyone for helping.

