Does Databricks offer something like Oracle's dblink?

quakenbush
Contributor

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

Anonymous
Not applicable

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")

View solution in original post

AdrianLobacz
Databricks Partner

quakenbush
Contributor

Thanks everyone for helping.