I am new in Pyspark. I am trying to connect to Amazon Aurora from Databricks using Pyspark. Can anyone please share a sample code to connect to Amazon Aurora from Databricks using Pysparks.
After doing some analysis I got the answer of own question. It is same as connecting to other oracle database.
Here we need to install post-gres driver as a pre-requisite.
SparkSession.builder.appName("Aurora_Database_Connection").getOrCreate()
driver_aurora = "org.postgresql.Driver"
query="your query"
df = spark.read.format("jdbc").option("driver", driver).option("url", url).option("user", username).\
option("password", password).option("query", query).load()