This is my current way after I invoke a Sparklyr session:
dbGetQuery(sparkContext, "USE DB_1")
df_1 <- tbl(sparkContext, "table_1")
dbGetQuery(sparkContext, "USE DB_2")
df_2 <- tbl(sparkContext, "table_2")
df <- df_1 %>% inner_join(df_2, by = c("col_1" = "col_2"))
nrow(df))
Errors that are I met with:
"Error: org.apache.spark.sql.AnalysisException: Table or view not found: table_1"
My take is Sparklyr does not (directly) support joining tables from 2 databases. I am wondering if anyone has an elegant solution to this problem