I am trying to connect to an Oracle DB from Azure Databricks but get this error : not suitable driver".
I've installed the JDBC driver from JAR on my cluster.
Any ideas why ?
from pyspark.sql import SparkSession
spark = SparkSession.builder.config('spark.driver.extraClassPath', 'dbfs:/FileStore/jars/2103b47d_3261_47b2_bd0c_d7a6240c54f5-DatabricksJDBC42.jar').getOrCreate()
url = "jdbc:oracle:thin:@myserver:1521:db"
properties = {'user': 'myuser', 'password': 'mypassword'}
df = spark.read.jdbc(url=url, table='db.table', properties=properties)
Thank you