I have an sql script which creates temp tables valid for only that session. Now after running the script, I am trying to read data from the table through spark and then process it. Below is the code I have code for spark read.
sparkSession.read().format("jdbc").option("url",
jdbcURL).option("dbtable", tableOrQuery).option("user",
userName).option("password", password)
.option("driver", driverName).load();
Now I need to pass the jdbc connection I created so that spark can read data in the same session. Is this possible ?