I am trying to connect to a SQL Server from local with pyspark. I've downloaded the last driver version, but when running the code below this error shows:
Error: "The server selected protocol version TLS10 is not accepted by client preferences [TLS12]"
The code is as following (Spark session was initiated before and the driver is located in a supported path):
jdbcDF = spark.read \
.format("jdbc") \
.option("url","jdbc:sqlserver://<host>\\<port>;database=<database>;") \
.option("dbtable", <table>) \
.option("user", <username>) \
.option("password", <password>) \
.option("driver", "com.microsoft.sqlserver.jdbc.SQLServerDriver") \
.load()
I read that one possible solution would be to change some configuration from the SQL Server, but this is not possible for me. Is there any way of fixing it without changing anything in the SQL Server?