Access table in other than default scheme (database) from sparklyr
You can either use a fully qualified name to register temporary view:
spark_session(sc) %>%
invoke("table", "my_database.my_table") %>%
invoke("createOrReplaceTempView", "my_view")
tbl(sc, "my_view")
or use sql
method to switch databases
spark_session(sc) %>% invoke("sql", "USE my_database")
and access table directly with dplyr:tbl
:
tbl(sc, "my_table")